Last active
April 5, 2018 08:08
-
-
Save braddalton/f14864a54a46f9af32e6 to your computer and use it in GitHub Desktop.
Remove Genesis Author Box Conditionally https://wpsites.net/web-design/remove-genesis-author-box-from-all-posts-in-one-or-more-categories/
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
add_action( 'get_header', 'remove_authorbox_conditionally' ); | |
/** | |
* @author Brad Dalton | |
* @link https://wpsites.net/web-design/remove-genesis-author-box-from-all-posts-in-one-or-more-categories/ | |
*/ | |
function remove_authorbox_conditionally(){ | |
if( in_category('category-slug') || in_category('category-slug') ) { | |
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