-
-
Save About2git/5bf221867b2c5280ed9d to your computer and use it in GitHub Desktop.
How to customize Entry Meta conditionally in Genesis
This file contains hidden or 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 | |
| //* 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