Dynamically add table of contents and add anchor based on heading innerHTML
I think you should use filters instead, and here are examples based on your code: (these should be added to your theme functions.php file) Filter 1, to be hooked on the render_block_data hook: function my_render_block_data( $parsed_block ) { // Check whether it’s a group block. if ( ‘core/group’ === $parsed_block[‘blockName’] ) { // Check whether … Read more