Last active
December 23, 2015 11:29
-
-
Save robneu/6629126 to your computer and use it in GitHub Desktop.
Conditionally remove the Genesis post info section from a single blog category on both single entries and archive pages.
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 the post info on a Genesis xHTML theme | |
* in a single category that you specify. | |
* | |
* @author FAT Media <http://youneedfat.com> | |
* @copyright Copyright (c) 2013, FAT Media, LLC | |
* @license GPL-2.0+ | |
*/ | |
add_action( 'genesis_before_loop', 'prefix_maybe_remove_post_info' ); | |
function prefix_maybe_remove_post_info() { | |
if ( in_category( 'Your Category' ) || is_category( 'Your Category' ) ) { | |
//* Remove the post info function | |
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment