-
-
Save neilgee/e5a996f157598a9044fb to your computer and use it in GitHub Desktop.
Conditionally Remove Header on everything apart from Front Page and Blog in Genesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//conditionally remove header | |
function themeprefix_remove_header() { | |
if( !is_front_page() && !is_home() ){ | |
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); | |
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); | |
remove_action( 'genesis_header', 'genesis_do_header' ); | |
} | |
} | |
add_action( 'genesis_before','themeprefix_remove_header' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment