Support » Fixing WordPress » What php file does Woocommerce ‘shop’ page use?

  • Hello

    I’m not sure if this is the right forum for this…

    but I’m trying to add a sidebar to the bottom of the shop page (woocommerce) and I can’t figure out whether it is using… index.php, page.php, page-full.php or what…

    If anyone can tell me how the structure works that would be great, I’ve looked at the woocommerce templates and it didn’t help.

    many thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Kanger

    (@kanger)

    Actually, I think it uses the page.php …my sidebar isn’t showing though, I’ve registered it and it’s showing on admin dashboard, just not being pulled in, I’ve put …
    if page is ‘shop’ kind of thing

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    The developers and users of that theme/plugin would be the best people to ask. You can reach them here:

    https://wordpress.org/support/plugin/woocommerce

    Go to Plugin : woocommerce\templates
    Like archive-product.php, single-product.php, taxonomy-product_cat.php, taxonomy-product_tag.php etc
    all templates files will be there. you can copy this file and past in your child theme. and you can add sidebar code there.

    Thread Starter Kanger

    (@kanger)

    I thought the shop used archive-product.php but I’ve tried altering that and it doesn’t change anything on shop page (taxonomy-product etc just call in the archive-product.php file)

    Okay. can you send me the details? i will check.

    Thread Starter Kanger

    (@kanger)

    This is code in both taxonomy files…

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly
    }

    wc_get_template( ‘archive-product.php’ );

    Then archive-product.php I have added lines of test code and it’s not showing….I did read something about woocommerce.php overriding it or something since 2016

    Thread Starter Kanger

    (@kanger)

    Anyone, got any ideas?

    I read something about ‘hooks’ but not sure I understand those… basically I need a way to be able to add a line of code to the ‘shop’ page.

    Thanks in advance

    Shital Marakana

    (@shital-patel)

    Hi Kanger,
    you can check the tutorial for Customize WooCommerce Shop Page Template file.
    How to add sidebar in bottom part in shop page?
    http://shitalmarakana.com/add-sidebar-bottom-shop-page-woocommerce/
    I hope it will be helpful.
    Thanks,
    Shital Marakana

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘What php file does Woocommerce ‘shop’ page use?’ is closed to new replies.