Support » Plugin: WooCommerce » Overwrite archive-product

  • Resolved Anonymous User 9027739

    (@anonymized-9027739)


    Hi all,

    I try the overwrite the archive-product.php, but it doesn’t work.

    Switching to the twentyeleve/twentytwelve theme’s and trying to override the archive-product.php file in the same fashion worked great, but they don’t include a native woocommerce.php file in their root directory either. What gives?

    https://wordpress.org/plugins/woocommerce/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Anonymous User 9027739

    (@anonymized-9027739)

    Anyone?

    More info
    I have created woocommmerce.php with:
    <?php woocommerce_content(); ?>

    And I add this to functions.php:

    /**
     * WooCommerce theme support
     */
    add_theme_support('woocommerce');

    I can’t overwrite the archive-product.php (copied in the theme/woocommerce).

    Anonymous User 9922786

    (@anonymized-9922786)

    Same problem here!

    jettison

    (@nepharius)

    I have the same problem too, for now I’m just working on the archive-product.php file in the plugin folder.

    I tried some workarounds but they didn’t get around to working – http://wordpress.org/support/topic/archive-productphp-1?replies=2

    Thread Starter Anonymous User 9027739

    (@anonymized-9027739)

    After a bit testing: woocommerce.php takes priority over all other templates such as archive-product.php. If the theme uses the woocommerce.php technique you cannot do it.

    Conclusion: when you want to keep control, don’t use woocommerce.php.

    Thanks for the update, but I doubled checked on my server and there is no woocommerce.php file in my theme, I had it before but I deleted it while going through my troubleshooting woes.

    Glad yours works though

    corsonr – a11n

    (@corsonr)

    Automattic Happiness Engineer

    the woocommerce.php file has the priority over the woocommerce/archive-product.php custom template. This is made to prevent display issues that could be caused by themes.

    Thread Starter Anonymous User 9027739

    (@anonymized-9027739)

    Thanks for the solution

    Nice that you edit the docs (http://docs.woothemes.com/document/third-party-custom-theme-compatibility/)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Overwrite archive-product’ is closed to new replies.