Last active
November 30, 2021 10:39
-
-
Save woogists/425310a576d329d1278ebed54d29bb93 to your computer and use it in GitHub Desktop.
[Theming][Conditional Tags] Working example how you would display different content for different categories.
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