Created
May 30, 2016 12:37
-
-
Save timothyjensen/228d866a6d7feabcd27293155d3e13e4 to your computer and use it in GitHub Desktop.
Remove post info from posts in Genesis, except from a specified post type
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 post info conditionally | |
add_action( 'genesis_before_entry' , 'tj_remove_post_info' ); | |
/** | |
* Remove post info from posts except from the Devotional post type | |
* | |
* @return void | |
*/ | |
function tj_remove_post_info(){ | |
//* Return early if this is the Devotional post type | |
if ( is_singular( 'devotional' ) || is_post_type_archive( 'devotional' ) ) { | |
return; | |
} | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 5 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment