Created
July 19, 2012 11:26
-
-
Save mikejolley/3143148 to your computer and use it in GitHub Desktop.
is_product_category() example
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
if ( is_product_category() ) { | |
if ( is_product_category( 'shirts' ) ) { | |
echo 'Hi! Take a look at our sweet tshirts below.'; | |
} elseif ( is_product_category( 'games' ) ) { | |
echo 'Hi! Hungry for some gaming?'; | |
} else { | |
echo 'Hi! Check our our products below.'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a conditional tag for parent or descendant categories?