Last active
August 29, 2015 13:56
-
-
Save wpspeak/8892349 to your computer and use it in GitHub Desktop.
Conditionally display custom tax in entry footer (Genesis Framework - HTML5)
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 | |
//* Conditionally display custom tax in entry footer (Genesis Framework - HTML5) | |
function afn_display_conditionals() { | |
if ( is_singular( 'portfolio' ) || is_post_type_archive( 'portfolio' ) ) { | |
add_filter('genesis_post_meta', 'afn_display_custom_tax'); | |
} | |
} | |
function afn_display_custom_tax($post_meta) { | |
$post_meta = '[post_terms taxonomy="type" before="Type: "]'; | |
return $post_meta; | |
} | |
add_action('wp', 'afn_display_conditionals'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment