I have created a new taxonomy for products on woocommerce.
Now, when I go to the taxonomy view and it shows 404.
how do i make it show the products just like in any other regular category on the site?
tnx ahead 🙂
I have created a new taxonomy for products on woocommerce.
Now, when I go to the taxonomy view and it shows 404.
how do i make it show the products just like in any other regular category on the site?
tnx ahead 🙂
You must be logged in to post a comment.
I tried this code and it works for me.
I created a taxonomy name ‘team’ and here is my code.
Note: I used this code in functions.php file. If anyone wants to use this code. Please replace the name ‘team’ with your custom taxonomy name.
Thanks,
Satya
This problem occurs when WordPress does not find any template for the custom taxonomy.
1.The solution is to create a WooCommerce template named as “taxonomy-tax_name.php” (ideally in a child theme).
2.For this you could copy the contents of an archive template like archive-product.php and modify it by doing a WP_Query() with arguments for post_type=>”product” and add a “tax_query” with the newly made custom taxonomy slug.
3.This would get you the required products and now can be displayed as required.