I am trying to modify a template file in single-product.php to show some text if the product is in a certain category. I am trying to use the is_category_product but cannot seem to get it to work.
Here is the code I am trying to use:
<?php if ( is_product_category( '40' )):?>This video will be mailed to you in DVD format.<?php else : ?> This Video will be Delivered Via Instant Download. High Speed Internet Connection Reccommended. <?php endif;?>
Any suggestions on how to get this to work?
Thanks so much in advance!
- The topic ‘Show if is in a certain category’ is closed to new replies.