I have a problem overriding standat Woocommerce template. I have a product category named "Parfyumeriya" on my website, so the link http://localhost/mywebsite/product-category/parfyumeriya/ shows the list of product in this category but it uses standart template. I want to use my own template, but I don't know which files of plugin's template should I edit. I tried content-product_cat.php, taxonomy-product_cat.php, archive-product.php, but nothing is working. Any ideas?
Asked
Active
Viewed 9,884 times
4
-
I think that if you have a file called `taxonomy-parfyumeria.php` that should load automatically when on that category archive if `parfyymeria` is the taxonomy terms' slug. – helgatheviking Nov 06 '17 at 21:47
1 Answers
2
If the template you want to replace or override belongs to woocommerce you will find it in the wp-content/plugins/woocommerce/templates.
To override it you have to create a folder in your child-theme also named woocommerce and copy the file (whole path inside templates) there where you can edit it and make changes to it.
For example:
plugins/woocommerce/templates/taxonomy-product_cat.php will be copied as themes/your_child_theme/woocommerce/taxonomy-product_cat.php
Regarding having a specific template for a product category the comment in the selected answer of this question says how to name the file:
taxonomy-product_cat-{slug}.php

Juan
- 5,525
- 2
- 15
- 26