Skip to content

Instantly share code, notes, and snippets.

@richstrauss
Created October 10, 2016 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richstrauss/bc5cacefc49d196b4c81366bd8acd2b0 to your computer and use it in GitHub Desktop.
Save richstrauss/bc5cacefc49d196b4c81366bd8acd2b0 to your computer and use it in GitHub Desktop.
Genesis: Remove Post Info, Post Meta from Custom Post Types
<?php
// Remove Post Info, Post Meta from Courses
add_action ( 'get_header', 'wpe_remove_post_info_course' );
function wpe_remove_post_info_course() {
if ('sfwd-courses' == get_post_type()) {//add in your CPT name
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
}
}
// Remove Post Info, Post Meta from Lessons
add_action ( 'get_header', 'wpe_remove_post_info_lesson' );
function wpe_remove_post_info_lesson() {
if ('sfwd-lessons' == get_post_type()) {//add in your CPT name
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
}
}
// Remove Post Info, Post Meta from Topics
add_action ( 'get_header', 'wpe_remove_post_info_topic' );
function wpe_remove_post_info_topic() {
if ('sfwd-topic' == get_post_type()) {//add in your CPT name
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment