Please see my code structure
Custom post type name : product
Custom taxonomy associated with product : category
Main category inside category taxonomy :main1, main2 etc
Sub taxonomy inside main1 : sub1, sub2 etc
I need to create template for all sub category and this templates are same. so I need to create one template only that is suitable for all category taxonomy.
Also I need to know how to get the current taxonomy or sub taxonomy slug inside this template file, and also how to know the current page is main taxonomy page or sub taxonomy page. please explain if you know the answer.
I to create taxonomy-category.php
, but that is not working
Why are taxonomy-category.php
and taxonomy-category-main1.php
not working?
After creating these pages and view products by category it's display Nothing Found.
category
. This name is already used by the build in taxonomycategory