WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Woocommerce] unable to customize archive-product.php (7 posts)

  1. clforever
    Member
    Posted 1 year ago #

    Hello all,

    Been banging my head against a wall for a day now.

    I've installed and activated Woocommerce, upon which I correctly placed the template files into my theme folder (themes/my-theme/woocommerce/). I have made significant changes to several of those template files with no issue, however nothing i do to the archive-product.php (shop base page) file takes effect.

    In fact, I've tested by deleting the archive-product.php file from my themes directory as well as the original templates folder, and the page is still up and running, so i don't even know where it's pulling the layout from?!

    I know the various functions are coming from the woocommerce-template.php file however there's no way to customize layout from this.

    I've double and tripple checked that i'm placing the files in the correct directories. There are no child themes. and i've read every relavent doc on the woothemes website.

    For a minute i was thinking it was some issue with the file permissions or something on the server side, but now that i can effect other files in the same directory, as well as seeing the page still live after completely deleting the archive-product.php file entirely, i'm at a complete loss.

    Any help would be appreciated.

  2. eastbank
    Member
    Posted 1 year ago #

    I'm having the exact same issue. Have edited other template files without issue, but can remove the archive-product.php completely from the plugins templates folder and from my custom theme folder and the page still displays just fine.
    Hoping someone can shed some light on this.

  3. eastbank
    Member
    Posted 1 year ago #

    Hey clforever, are you using a child theme?
    I found my issue was with my child theme, I was using Roots as my main theme and it worked fine if I turned off the child theme and I had to trouble shoot from there. Luckly everything I wanted to do was able to be achieved using a filter.

    Good luck!

  4. clforever
    Member
    Posted 1 year ago #

    Hey eastbank,

    Unfortunately I'm not using a child theme nor can I achieve everything needed with filters alone.

    It's got me stumped to no end.

    Thanks for the reply!

  5. eastbank
    Member
    Posted 1 year ago #

    No problem, one thing I'd recommend trying is changing to the twentytwelve theme and seeing if it works then. I tried that and that narrowed it down to something in my theme causing it.
    It's a place to start. Odds are it's something in the theme, and not a problem with woocommerce

  6. dankfresh
    Member
    Posted 7 months ago #

    I'm having the same problem. Strangely enough, eastbank's suggestion at least let me figure out that it was native to my theme, but why I don't know.

    I switched to twentytwelve, made a woocommerce/archive-product.php file, override worked fine.

    Go to my theme, start from scratch, do the same thing, override does not work at all.

    This is a custom theme, so I have a woocommerce.php file in the root of my theme folder, which replaces the loop with <?php woocommerce_content(); ?> and then I declare support in the functions.php file like Woocommerce suggests here - http://docs.woothemes.com/document/third-party-custom-theme-compatibility/

    THATS IT.

    Again, even stranger, the only file that I haven't been able to successfully override in my theme is archive-product.php. Everything else works!!

    These are all according to WooCommerce's docs, so I don't know what could cause the override not to work in my theme. Would love to know.

  7. dankfresh
    Member
    Posted 7 months ago #

    I was able to "work around" it by using this solution - http://stackoverflow.com/questions/16353899/changes-on-archive-product-php-doesnt-work

    but... that goes against what the WooCommerce documentation says. Sort of scares me to use it.

Topic Closed

This topic has been closed to new replies.

About this Topic