Created
October 10, 2016 13:20
-
-
Save richstrauss/bc5cacefc49d196b4c81366bd8acd2b0 to your computer and use it in GitHub Desktop.
Genesis: Remove Post Info, Post Meta from Custom Post Types
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, 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