Last active
August 29, 2015 14:13
-
-
Save Deaner666/863ea41c8500d122adee to your computer and use it in GitHub Desktop.
Add author box to all post types (except pages) and then remove it from "Snippets" Custom Post Type
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 | |
// Add author box to single posts and author archives | |
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' ); | |
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' ); | |
// And remove it from anything that's not a post | |
add_action ('genesis_entry_footer', 'wpm_remove_author_box' ); | |
function wpm_remove_author_box() { | |
if ( get_post_type() == 'snippet' ) { | |
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment