Created
July 7, 2017 04:18
-
-
Save generatepress/4b79c032a29e52f769eb3a1e7d41155f to your computer and use it in GitHub Desktop.
Disable the title, top bar and header on pages and products.
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
add_action( 'wp', 'tu_disable_cpt_elements' ); | |
function tu_disable_cpt_elements() { | |
if ( is_page() || 'product' == get_post_type() ) { | |
remove_action( 'generate_before_header', 'generate_top_bar', 5 ); | |
remove_action( 'generate_header', 'generate_construct_header' ); | |
add_filter( 'generate_show_title', '__return_false' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment