Created
January 13, 2015 14:08
-
-
Save Deaner666/f141d66f1e107eb56332 to your computer and use it in GitHub Desktop.
Add Genesis author box then remove it from everything except actual Posts
This file contains hidden or 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() != 'post' ) { | |
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