1

I've tried this hack from a previous thread:

Replace woocommerce_content() in woocommerce.php with:

if ( is_singular( 'product' ) ) {
    woocommerce_content();
} else {
    //For ANY product archive.
    //Product taxonomy, product search or /shop landing
    woocommerce_get_template( 'archive-product.php' );
}

This now loads the archive-product.php from the /plugin folder which is a step forward, but it should really load the archive-product.php from the /myTheme folder. I don't want to mess around in the plugin folder for obvious reasons...

Has anyone found a workaround for this?

Community
  • 1
  • 1
sba222
  • 145
  • 6
  • Your **archive-product.php** file should be in your theme folder, within a `/woocommerce` directory. So: `/wp-content/themes/your-theme/woocommerce/archive-product.php`. – rnevius Nov 12 '14 at 10:51
  • OMG yes, I had it in `/wp-content/themes/your-theme/woocommerce/templates/archive-product.php`. Silly me.. Thank you! – sba222 Nov 12 '14 at 11:14
  • My pleasure! I just added my comment as an answer. It would be great if you could upvote or select as correct. Thanks! – rnevius Nov 12 '14 at 11:16
  • 1
    Just did it- thanks again! – sba222 Nov 12 '14 at 11:26

1 Answers1

0

Your archive-product.php file should be in your theme folder, within a /woocommerce directory. So: /wp-content/themes/your-theme/woocommerce/archive-product.php. It's a bit confusing, because the actual WooCommerce templates are within an additional /templates directory, in the plugin itself.

Read more about overriding WooCommerce templates in their documentation: http://docs.woothemes.com/document/template-structure/

rnevius
  • 26,578
  • 10
  • 58
  • 86