This custom category template for WooCommerce displays products for 1 specific parent category and all child or sub category terms below that parent term. The template enables you to modify the default output of the parent and child terms product archive via your child theme, for any/all category or other taxonomy including parent and child terms at any level of the hierarchy.
The template loads products for every sub category level below the parent.
Installation
Upload to your child theme folder, templates folder or custom functionality plugin and name the file using the term slug used when you created the category. In this example, the term is named smallest-template so swap that part of the template filename with the name of your term. Example : taxonomy-product_cat-smallest-template.php.
Same Template For All Child Categories
If you only need to use the same custom template on all sub category or child taxonomy archive pages, use this code in your child themes functions file and match the file name and path to the template.
Total Control
If you need to customize any part of the output for the default archive template, use this custom loop template for complete modfication of parent, child and sub category archives instead.
Reviews
There are no reviews yet.