Wrapping Gutenberg block
-
I want to use the Simple Sitemap Gutenberg block, but I need to wrap it in an extra div. How would I go about that?
I saw this example:
add_filter( 'render_block', 'wrap_table_block', 10, 2 ); function wrap_table_block( $block_content, $block ) { if ( 'core/table' === $block['blockName'] ) { $block_content = '<div class="example">' . $block_content . '</div>'; } return $block_content; }
Could I use something like that, if so what would I replace ‘core/table’ with?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Wrapping Gutenberg block’ is closed to new replies.