Skip to content

Instantly share code, notes, and snippets.

@About2git
Forked from srikat/functions.php
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save About2git/5bf221867b2c5280ed9d to your computer and use it in GitHub Desktop.

Select an option

Save About2git/5bf221867b2c5280ed9d to your computer and use it in GitHub Desktop.
How to customize Entry Meta conditionally in Genesis
<?php
//* Do NOT include the opening php tag
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