• Resolved pepe80

    (@pepe80)


    How to add a div wrapper outside of blocks in backend editor? “render_block” filter only works on the frontend:

    
    add_filter( 'render_block', 'wrap_embed_block', 10, 2 );
    
    function wrap_embed_block( $block_content, $block ) {
      $block_content = '<div class="wrapper">' . $block_content . '</div>';
      return $block_content;
    }
    
    • This topic was modified 3 years, 3 months ago by pepe80.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add a div wrapper outside of blocks in backend editor?’ is closed to new replies.