Created
March 11, 2014 20:34
-
-
Save media317/9494417 to your computer and use it in GitHub Desktop.
Conditional tag with Custom Post Type and Custom Taxonomy
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
//* Custom Genesis Loop | |
remove_action ( 'genesis_loop', 'genesis_do_loop' ); | |
add_action ( 'genesis_loop', 'cbc_custom_loop' ); | |
function cbc_custom_loop() { | |
if (has_term('custodial')) { | |
echo '<h1>'; | |
echo the_title(); | |
echo '</h1>'; | |
echo '<h2>' . genesis_get_custom_field ('cbc_priority_level') . '</h2>'; | |
echo '<p>' . genesis_get_custom_field ( 'cbc_f_name' ) . '</p>'; | |
} else { | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment