Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active March 22, 2016 02:54
Show Gist options
  • Select an option

  • Save srikat/9f81d487c2bc120f7f08 to your computer and use it in GitHub Desktop.

Select an option

Save srikat/9f81d487c2bc120f7f08 to your computer and use it in GitHub Desktop.
How to customize Entry Meta conditionally in Genesis. http://sridharkatakam.com/customize-entry-meta-conditionally-genesis/
add_filter( 'genesis_post_meta', 'sk_post_meta_filter' );
/**
* Customize entry meta in entry footer
*
* Context: Archive page and Singular pages of 'books' CPT.
*
* @author Sridhar Katakam
* @link http://sridharkatakam.com/
*/
function sk_post_meta_filter( $post_meta ) {
if ( is_post_type_archive( 'books' ) || is_singular( 'books' ) ) {
$post_meta = '[post_categories before="Posted Under: "] [post_tags before="Tags: "]';
}
return $post_meta;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment