Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[Theming][Conditional Tags] Working example how you would display different content for different categories.
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