WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Change shop sidebar (6 posts)

  1. Ulrich
    Member
    Posted 1 year ago #

    Hello,

    I am interested in changing the default sidebar to another. I solved this by using the template "sidebar.php" from the shop folder and by changing "shop" to a sidebar in the theme.
    get_sidebar('shop');

    Is this the best way or could I have done it with a function also?
    Where can I find the sidebar-shop.php? Does it exist?

    Ulrich

    http://wordpress.org/extend/plugins/woocommerce/

  2. bheadrick
    Member
    Posted 1 year ago #

    there's no sidebar-shop.php, there is only sidebar.php located in the templates folder under the "shop" folder.

    you have this file copied to a "woocommerce" folder within your active theme, correct?
    If so, the method you used is appropriate.

    I found the shop widget area a bit unwieldy as I wanted to have the same set of widgets throughout my site, so i just did this:

    remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);

  3. Ulrich
    Member
    Posted 1 year ago #

    So I did a bit of testing and I created a sidebar-shop.php in my child theme. It worked! I just had to add a simple code the functions.php so that it is displayed in the widget area.
    http://pastebin.com/0UYkBGM2
    This is specific to the Responsive Theme.

    The shop sidebar default to the main sidebar. What I tested was I could change the size of the widget in the shop page without changing the width of it on other pages.

    WooCommerce is good as the possibilities are endless.

    @bheadrick thank you for your input

    Ulrich

  4. mattadorr
    Member
    Posted 10 months ago #

    Hello Ulrich
    Can you explain in details, how you did this.
    Becouse I tried to follow your steps, but I cant make it.

  5. Ulrich
    Member
    Posted 10 months ago #

    Hey Mattadorr,

    What theme are you using?

    The general idea is to copy the sidebar.php from your parent theme to a newly created folder "woocommerce" in the child theme. Rename the file then to sidebar-shop.php.

    You can then use WooSidebar to display different widgets on the shop page.

  6. Seahawksean
    Member
    Posted 10 months ago #

    Ulrich,

    Is your shop sidebar displaying ONLY on the shop page? I've created a sidebar-shop.php and gave it an id of 'sidebar-shop'. It shows up in my widget panels but does not display on the shop page. It seems that when I change the id from 'shop-widgets' to 'sidebar-shop' (as you did) it removes the sidebar from the shop page.

    If you could elaborate a bit on how you accomplished this, I would be greatly appreciative.

    Also, if you could include a link to your site so I can look at what you accomplished, that may be of help to me as well. Thanx.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.