Oops posted in the wrong thread.
You are right, it’s the render_block filter. Here I remove a GB container when a custom term from a custom taxonomy is viewed.
add_filter( 'render_block', function( $content, $block ) {
if ($block['blockName'] === 'generateblocks/container') {
if (isset($block['attrs']['className']) ) {
if (strpos( $block['attrs']['className'], 'bet-of-the-day-sidebar' ) !== false && is_tax( 'my-taxonomy', 'my-term' ) ) {
return '';
}
}
}
return $content;
}, 10, 2 );
Thanks!