Conditional code.
-
Hi.
I want to do this but without the echo!!!!!:
I want to be able to use straight html.
<?php 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.'; } } ?>
I want to do this:
<?php if ( is_product_category() ) { if ( is_product_category( 'shirts' ) ) { my info } elseif ( is_product_category( 'games' ) ) { 2nd info } else { general info } } ?>
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Conditional code.’ is closed to new replies.