I’m making a custom woocommerce product template and want to show some text only when the current product is in a specific product category. I have entered “product_cat” for the meta key and the category slug for the meta value. I’ve tried both “value is equal to” and “value contains”, but it’s not working. What am I doing wrong?
Have you tried using the Location visibility control instead of the Metadata option? This will allow you to easily configure conditions, based on the location of the block. In this case you would define a rule to show the block based on the post taxonomy. This includes all custom post types, such as products in Woo.
Let me know if this approach works for you.
Best, Nick
Viewing 1 replies (of 1 total)
The topic ‘targeting product categories’ is closed to new replies.