Skip to content

Instantly share code, notes, and snippets.

@mjsdiaz
Last active August 29, 2015 14:12
Show Gist options
  • Save mjsdiaz/2e9d7b5a9f9e2bde07f3 to your computer and use it in GitHub Desktop.
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)
<?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');
}
}
//* 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