Last active
August 29, 2015 14:12
-
-
Save mjsdiaz/2e9d7b5a9f9e2bde07f3 to your computer and use it in GitHub Desktop.
These snippets will remove the page title from an array of pages (Genesis Only)
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 | |
// Remove page title on select pages; leaves entry_header_markup | |
// Instead of page slugs, you could substitute page IDs | |
add_action( 'genesis_entry_header', 'mb_remove_page_title', 5 ); | |
function mb_remove_page_title() { | |
if ( is_page( array('home', 'real-estate', 'contact-me' ) ) ) { | |
remove_action('genesis_entry_header', 'genesis_do_post_title'); | |
} | |
} |
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
//* Remove page title and entry_header_markup on select pages | |
add_action('genesis_entry_header', 'mb_remove_page_title', 4 ); | |
function mb_remove_page_title() { | |
if ( is_page( array('home', 'real-estate', 'contact-me' ) ) ) { | |
remove_action('genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); | |
remove_action('genesis_entry_header', 'genesis_do_post_title'); | |
remove_action('genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment