Check if Product Belongs to a Product Category or Tag
In this tutorial I will show how to check in the code if a current product in the loop or a product with a certain ID belongs to specific product categories or tags.
In this tutorial I will show how to check in the code if a current product in the loop or a product with a certain ID belongs to specific product categories or tags.
In this tutorial I will show you two ways how to check if currently displayed page is a product category. We will also try to detect categories with certain IDs, slugs and names.