4

I'm creating a custom Wordpress/woocommerce theme for a client based on FoundationPress. For some reason I can't override taxonomy-product_cat.php. I can override this file with other themes like twenty-nnn or Storefront. I spend half a day finding a answer with no luck.

At the end I stripped down the Foundationpress theme to just a index.php + style.css. I cleared the caches, recreated the template files in Woocommerce > status > tools. I disabled all the third party plugins except Woocommerce.

But it still refuses to override my category template. I'm stuck here. Can somebody please give me some directions?

In 'Woocommerce > status' I see this template marked as overridden. But It doesn't show on the frontend.

1 Answers1

13

Solved:

I finally found a solution.

You have to declare "add_theme_support" in your functions.php:

add_theme_support( 'woocommerce' ); 

After that, my custom Woocommerce templates finally gets recognized.

Strangely enough it's not mentioned clearly in the docs on the Woocommerce website.

  • 1
    Thank you I had the same issue, so incredibly stupid. Spent several hours on this as well. – user1718074 Feb 15 '18 at 10:00
  • Fixed for me, too. I should also note that I use underscores, and within the functions.php of that starter theme, there is an action/function that handles other add_theme_support() functions. Therefore, I added it in there, like this: add_action('after_setup_theme', 'jwd_setup'); Within jwd_setup(), I added add_theme_support( 'woocommerce' ); This seems to be working fine. – Jordan Carter Sep 17 '18 at 19:57