If is_category issues
-
Hello,
Basically I am making a website for a local shop using wordpress and woocommerce. They want a different background to be used on two of the categories, Which should be very straight forward…
But, for some reason, it’s deciding not to function as it should. I have tried using the woocommerce documentation, but quite frankly it’s worthless (tells me nothing about how to use the parameters) so I attempted to use it just as the wordpress is_category. I have also tried using is_category.The problem is, it isn’t registering any of my parameters. All it is doing is the basic is_category() function. I have tried using the name, slug and ID all without success.
<?php if (is_product_category( 'legal-highs' )) : ?> <style type="text/css"> #wrapper {background-image:url(https://streetwiseheadshop.co.uk/wp-content/themes/streetwise2/images/background2.jpg) !important;} </style> <?php endif; ?>
This is the code I’m using (obviously change is_product_category to is_category, it makes no difference so far…
What am I doing wrong?
- The topic ‘If is_category issues’ is closed to new replies.