core blocks
-
Hello, I have been trying to apply an apply_filter like this for hours
echo apply_filters( 'render_block', $blockContent, $block )
;////////////////////////////////////////////////// / //////////////////
add_filter('render_block', 'display_post_heading', 10, 2); show_post_header() function { global post $; $blocks = parse_blocks ($post->post_content); foreach ($blocks as $block) { if( 'core/heading' === $block['blockName'] ) { echo render_block($block); break; } }
can someone guide me on the path of the light of worpress
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘core blocks’ is closed to new replies.