Created
May 4, 2017 21:45
-
-
Save anonymous/0731e8336ecfc74feaae5110f99a0d3b to your computer and use it in GitHub Desktop.
Custom Taxonomy Term conditionals
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 if (has_term (‘gardening’, ‘topics’)) : ?> | |
<p>This is the text to describe gardening</p> | |
<?php elseif (has_term(‘cooking,’ topics')) : ?> | |
<p>This is the text to describe cooking</p> | |
<?php else : ?> | |
<p>This is some generic text to describe all other taxonomy term pages, I could be left blank</p> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment