Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save timothyjensen/228d866a6d7feabcd27293155d3e13e4 to your computer and use it in GitHub Desktop.
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
<?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