• kmytort

    (@kmytort)


    I need a guide to solve the problem with all the gutenberg blocks, I searched and found nothing, can you help me, I can’t find a list of block types either, I had to search one by one, they are these:

    
    'archives',
    'audio',
    'button',
    'categories',
    'code',
    'column',
    'columns',
    'coverImage',
    'embed',
    'file',
    'freeform',
    'gallery',
    'heading',
    'html',
    'image',
    'latestComments',
    'latestPosts',
    'list',
    'more',
    'nextpage',
    'paragraph',
    'preformatted',
    'pullquote',
    'quote',
    'reusableBlock',
    'separator',
    'shortcode',
    'spacer',
    'subhead',
    'table',
    'textColumns',
    'verse',
    'video'

    but my question is how can I customize the blocks the most I could do is this little code and call them from their function

    function post_media() {
     global $post;
    	$blocks = parse_blocks( $post->post_content );
    	foreach( $blocks as $block ) {
    		if( 'core/media-text' === $block['blockName'] ) {
          echo render_block( $block );
          break;
        }
      }
    }
    <div class="photos">
            <?php  echo post_media() ?>
        </div>

    can you guide me on the path of the light of the hidden code?
    Thanks

Viendo 1 respuesta (de un total de 1)
Viendo 1 respuesta (de un total de 1)
  • El debate ‘core/media-text’ está cerrado a nuevas respuestas.