WAIT: Template page condition not working after update V2

I made a dual page template for my pages.
Default render Bricks
Render Gutenberg content (condition {echo:has_blocks} )

With Bricks 12.4 it was working. After updated to V2, the gutenberg content not render.

Hi @simplecreative,

if you just add {echo:has_blocks} to the basic text, what is the output?

Matej

Hi @Matej ,

I’m having the same issue. When I add {echo:has_blocks()} to the basic text element, the output on every page is simply blank.

Hey @CrimsonCoder,

there are two things that might happen:

  1. The pages don’t actually have blocks.
  2. You don’t have has_blocks function call allowed: Filter: bricks/code/echo_function_names – Bricks Academy. If that’s the case, that’s the code to use:
add_filter( 'bricks/code/echo_function_names', function() {
  return [
    'has_blocks',
  ];
} );

Let me know :slight_smile:
Matej