Skip to content

Instantly share code, notes, and snippets.

@robneu
Last active December 23, 2015 11:29
Show Gist options
  • Save robneu/6629126 to your computer and use it in GitHub Desktop.
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.
<?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