Skip to content

Instantly share code, notes, and snippets.

@PurpleHippoDesign
Last active August 29, 2015 14:03
Show Gist options
  • Save PurpleHippoDesign/952b0d8059f83bba6397 to your computer and use it in GitHub Desktop.
Save PurpleHippoDesign/952b0d8059f83bba6397 to your computer and use it in GitHub Desktop.
Conditional tag for multiple custom post types
<?php // Get rid of this tag
// Remove Post Info and Post Meta from Custom Post Types
function pbh_remove_post_info() {
if ( in_array(get_post_type(), array ('testimonial', 'project'))) {
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
}
}
add_action ( 'get_header', 'pbh_remove_post_info' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment