Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save StewartChamberlain/6123284 to your computer and use it in GitHub Desktop.
Save StewartChamberlain/6123284 to your computer and use it in GitHub Desktop.
<?php
/** Do NOT include the opening php tag */
/** Remove Post Info for Custom Post Types */
function sc_remove_cpt_post_info( $query ) {
if ( is_post_type_archive('CHANGE TO YOUR CPT') ) {
// Remove the post info function
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); // Use this line if using pre Genesis 2.0
remove_action( 'genesis_entry_header', 'genesis_post_info' ); // Use this line if using Genesis 2.0 with HTML5 activated
}
}
add_action('pre_get_posts', 'sc_remove_cpt_post_info');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment