• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Show WooCommerce Product Categories only in Sidebar on WooCommerce Pages

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Show WooCommerce Product Categories only in Sidebar on WooCommerce Pages

This topic is: resolved

Tagged: custom sidebar, genesis connect woocommerce, Genesis Simple Sidebars

  • This topic has 11 replies, 2 voices, and was last updated 6 years, 9 months ago by plentyvegan.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • June 16, 2016 at 3:01 pm #187711
    plentyvegan
    Member

    Hi and thanks in advance for any help you can offer.

    I have installed WooCommerce and Genesis Connect for WooCommerce on my Genesis, Divine Theme site. I find the sidebar that works for the rest of the site - the blog, mostly - is goofy when it comes to the store: http://plentyvegan.com/shop/. I haven't populated the products yet, but I want the shop to serve as a stand-alone market. I think the best way to do this would be to have the sidebar only consist of product category selections, like in most ecommerce stores, on all WooCommerce pages - shop, product pages, category pages, etc. - and have the sidebar that shows recent posts, Instagram feed, etc. appear on the rest of the site.

    If possible, I would like this category tree to be a left-hand sidebar, vs. my right-hand sidebar for the rest of the site (odd, maybe, but seems to be convention?).

    Is there any way to customize this?

    Thanks again.

    http://plentyvegan.com/shop/
    June 16, 2016 at 3:53 pm #187713
    Brad Dalton
    Participant

    You can install a plugin like Widget Logic and use the is_product() conditional tag

    Or

    You can use Genesis Simple Sidebars and add support for WooCommerce

    Or

    You can hand code a sidebar widget area in a single product template.


    Tutorials for StudioPress Themes.

    June 16, 2016 at 4:04 pm #187714
    plentyvegan
    Member

    Thanks for responding so quickly!

    I actually just installed Genesis Simple Sidebars. It's great.

    Now, I want to make sure only that sidebar appears on my WooCommerce pages. To that end, I dropped this code in the functions.php file:

    function themeprefix_remove_default_sidebar() {
    if( is_page ( array( 'cart', 'checkout' )) || 'product' == get_post_type() ) {//set which pages
    remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
    add_action( 'genesis_sidebar', 'themeprefix_add_woo_sidebar' );
    }
    }
    //Alternative Sidebar
    function themeprefix_add_woo_sidebar() {
    dynamic_sidebar( 'Plenty Vegan Market' ); //add in the sidebar name
    }
    add_action( 'genesis_before_sidebar_widget_area', 'themeprefix_remove_default_sidebar' ); //sets the ball rolling

    Now what is happening is the the sidebars are stacked, rather than the Primary Sidebar that I have active on the entire site being removed. Here's an example: http://plentyvegan.com/product/herb-crackers/

    I grabbed that code from someone's site so I can't figure out what to edit to remove the Primary Sidebar. Do you know what I edit?

    Thanks again.

    June 16, 2016 at 4:49 pm #187716
    Brad Dalton
    Participant

    I suggest you ask the original author of the code why it doesn't work and how to fix it.

    Also, i can't see it stacked, did you link to the site where the code is installed?


    Tutorials for StudioPress Themes.

    June 16, 2016 at 4:52 pm #187717
    plentyvegan
    Member

    I've asked the author - thought I'd try you too just in case there's no response there.

    Yeah that page show them stacked (http://plentyvegan.com/product/herb-crackers/). The Simple Sidebar begins at "Product Categories". If you click to the blog, you'll see that the sidebar there doesn't have that part.

    June 16, 2016 at 4:56 pm #187718
    Brad Dalton
    Participant

    I wouldn't use simple sidebars and code at the same time.

    I would choose which solution you want to use and only use 1 solution to avoid conflicts.


    Tutorials for StudioPress Themes.

    June 16, 2016 at 5:03 pm #187719
    plentyvegan
    Member

    Ah ok.

    Sounds like your suggestion of:

  • You can install a plugin like Widget Logic and use the is_product() conditional tag
  • Is simple enough. I'll try that route.

    Thanks for your help - I'll give it a go tomorrow and if I have issues, might hit you up for more suggestions. Great help!

June 17, 2016 at 12:25 am #187725
Brad Dalton
Participant

Also note: The WooCommerce Genesis Connect plugin includes support for Genesis Simple Sidebars built in.


Tutorials for StudioPress Themes.

June 17, 2016 at 9:48 am #187748
plentyvegan
Member

I'm a bit lost on this point. I have WooCommerce Genesis Connect installed and Genesis Simple Sidebars. What does it mean that Connect includes support for Sidebars?

June 17, 2016 at 12:16 pm #187760
plentyvegan
Member

Update:

I uninstalled simple sidebars and installed WooSidebars. Seems to work like a charm.

Thanks!

June 17, 2016 at 8:48 pm #187774
Brad Dalton
Participant

Good solution if you want to use another plugin.

If you want a custom template which includes a custom sidebar for single product pages, here's a template i spent several hours coding for use in any Genesis child theme.


Tutorials for StudioPress Themes.

June 27, 2016 at 10:23 am #188386
plentyvegan
Member

Thanks for your help. I think I have a workable solution for now. Great to have the code for the custom sidebar if that looks like a good option for the future.

Thanks again.

  • Author
    Posts
  • Viewing 12 posts - 1 through 12 (of 12 total)
    • The topic ‘Show WooCommerce Product Categories only in Sidebar on WooCommerce Pages’ is closed to new replies.

    CTA

    Ready to get started? Create a site or shop for themes.

    Create a site with WP EngineShop for Themes

    Footer

    StudioPress

    © 2023 WPEngine, Inc.

    Products
    • Create a Site with WP Engine
    • Shop for Themes
    • Theme Features
    • Get Started
    • Showcase
    Company
    • Brand Assets
    • Terms of Service
    • Accptable Usse Policy
    • Privacy Policy
    • Refund Policy
    • Contact Us
    Community
    • Find Developers
    • Forums
    • Facebook Group
    • #GenesisWP
    • Showcase
    Resources
    • StudioPress Blog
    • Help & Documentation
    • FAQs
    • Code Snippets
    • Affiliates
    Connect
    • StudioPress Live
    • StudioPress FM
    • Facebook
    • Twitter
    • Dribbble