I’m looking to hide a header element from page 2 onwards of my blog. I’ve tried a code I found on the forum to hide the header which works fine BUT it also hides my category headers for pages 2 onwards which I don’t want to happen.
I only want to apply this to the homepage header.
I’ve also tried the following:
add_filter( 'generate_block_element_display', function( $display ) {
if ( 6125 === $element_id && is_paged() ) {
$display = false;
}
return $display;
} );
But that fails on me.
Any ideas?