[Resolved] Remove Sidebar

Home Forums Support Remove Sidebar

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #285012
    Nicholas

    Hi,

    Thanks again for a great theme and support, it has been a extremely nice process working with generatepress theme.

    I’m having a small issue, I would either like to remove my blog sidebar or change it to a different sidebar all together. The issue I am having is that my Woocommerce page is using the same sidebar as my blog, so if I remove in global settings the blog sidebar it removes my Woocommerce sidebar. I also don’t want to use the same sidebar that I use on my Woocommerce page on my blog page because it is not relevant. So how would I go about removing just the blog sidebar.. or changing its contents completely.

    #285072
    Leo
    Staff
    Customer Support

    Hi Nicholas,

    Glad you are enjoying GP πŸ™‚

    The setting should be in Customizer > Layout > Sidebars > Blog Sidebar Layout.

    Let me know if this helps.

    #285106
    Nicholas

    The problem with setting that to Content(No sidebar) is that it also takes it off my WooCommerce Shop page? Im not sure why it uses the blog layout but it apparently does.

    #285107
    Leo
    Staff
    Customer Support

    ahh yes WooCommerce pages are also index pages. Try this CSS then:

    .blog .sidebar {
        display: none;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know if this works.

    #285112
    Tom
    Lead Developer
    Lead Developer

    Instead of using CSS, you should use a filter: https://docs.generatepress.com/article/sidebar-layout/#using-a-function

    There’s a lot of examples there, including how to target WooCommerce πŸ™‚

    #285117
    Leo
    Staff
    Customer Support

    ahh right. If you want to hide sidebar on normal blog page and keep it on WooCommerce, then try this:

    add_filter( 'generate_sidebar_layout','tu_custom_category_sidebar_layout' );
    function tu_custom_category_sidebar_layout( $layout )
    {
     	// If we are on blog page, set the sidebar
     	if ( is_home() )
     	 	return 'no-sidebar';
    
     	// Or else, set the regular layout
     	return $layout;
    
     }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let us know.

    #285119
    Nicholas

    Leo, that was easy :D. Thank you (def an option for me to use if I can’t figure other option out)

    Tom, is there a way with the functions for Woocommerce, to allow that to have a different right sidebar then my blog page? The Woocommerce page having my cart widget etc.. and my blog sidebar showing my recent posts widgets etc?

    #285121
    Leo
    Staff
    Customer Support

    You’re welcome πŸ™‚

    Can try using a plugin like this:
    https://en-ca.wordpress.org/plugins/custom-sidebars/

    #285128
    Tom
    Lead Developer
    Lead Developer

    There’s also Content Aware Sidebars, Easy Custom Sidebars, Display Widgets etc..

    Lots of options πŸ™‚

    #285137
    Nicholas

    Oh okay perfect I will look into some of those plugins, thank you both!

    Always impressed by the quick response and support and I have only had the theme for a week πŸ˜€ thanks!

    #285142
    Leo
    Staff
    Customer Support

    We try our best to keep up! πŸ™‚

    #477914
    Michael

    Hi Leo

    How do I completely remove the sidebars?
    When I go to pages>screen options there’s no sidebar layout being listed.
    I went to disable element to content(no sidebars) save update and refresh.
    the sidebar is still there when i view my site.
    help please

    #477915
    Michael

    basically i want to use element or to customise my theme.

    #478082
    Leo
    Staff
    Customer Support

    The global sidebar layout options are in the customizer: https://docs.generatepress.com/article/sidebar-layout/

    If you need additional info, please open a new topic.

    #1424128
    Dallas

    I wanted to chime in here. I’ve been using GeneratePress now for about 5 years as a premium customer, and I ran into the same situation as others in GeneratePress being perceived as more of a blogger’s template. Nothing could be further from the truth! I am now creating an eCommerce site to begin a dropshipping business. The control for premium customers over the theme and especially WooCommerce is like nothing else out there! I was able to take the advice Leo las mentioned, and was able to easily turn off all of the sidebars with just a simple dropdown selection under Customize->Layouts. If you are not a premium customer, you owe it to yourself to get on board. Thank you Leo, for a great product in GeneratePress/Premium and endless support second to none!

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.