Skip to content

Instantly share code, notes, and snippets.

@Deaner666
Created January 13, 2015 14:08
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 Deaner666/f141d66f1e107eb56332 to your computer and use it in GitHub Desktop.
Save Deaner666/f141d66f1e107eb56332 to your computer and use it in GitHub Desktop.
Add Genesis author box then remove it from everything except actual Posts
<?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