Created
May 22, 2019 08:51
-
-
Save damiencarbery/59c9e18872eb0bc56b4894d288ccea36 to your computer and use it in GitHub Desktop.
Remove the entry-header area on pages. Do not change single posts or archives
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 | |
/* | |
Plugin Name: Remove page title (Genesis) | |
Plugin URI: http://www.damiencarbery.com | |
Description: Remove the entry-header section (with page title, post info and featured image) from pages but not posts or archives. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
add_action( 'genesis_before_entry', 'dcwd_remove_page_title' ); | |
function dcwd_remove_page_title() { | |
if ( is_page() ) { | |
remove_action( 'genesis_entry_header', 'genesis_do_post_format_image', 4 ); | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment