Remove header with PHP function
-
Hi to everyone.
I’m looking for removeheader
in specific page with PHP.
I found this code and this too but it doesn’t work.
In child theme’sfunctions.php
file I tried these solutions, without results:add_action( 'after_setup_theme','tu_remove_header' ); function tu_remove_header() { if ( is_page( 123 ) ) { remove_action( 'generate_header','generate_construct_header' ); }}
and this
if ( is_page( 123 ) ){ remove_action( 'generate_header','generate_construct_header' ); }
I can’t understand where I’m wrong.
For the moment I use this CSS code by Leo.
Thanks!
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Remove header with PHP function’ is closed to new replies.