Hi,
I’m trying to disable the “global hero page header” in order to create a custom one on a custom template page.
I tried to do that by adding a filter inside functions.php like that :
add_filter( 'generate_hook_element_display', function( $display, $element_id ) {
if ( 68 === $element_id && is_page_template('template_top_img.php')) {
$display = false;
}
return $display;
}, 10, 2 );
where 68 is the ID of the “global hero page header” element, and template_top_img my custom template page. But it changes nothing.
What’s wrong?
THanks for your support