[Resolved] Sidebar layout home page not working

Home Forums Support [Resolved] Sidebar layout home page not working

Home Forums Support Sidebar layout home page not working

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #247599
    Damiaan van Vliet

    Hi, for some reason the sidebar layout on the home page is not working.
    I have woocommerce installed. So it is on the shop page.
    I edit the page, sidebar/content.
    I have filled the sidebar with widgets.
    Don’t know what to do else.
    With default theme no problem.

    Strange…

    #247712
    Tom
    Lead Developer
    Lead Developer

    If the page is an index (blog page, main WooCommerce page), the meta box settings won’t apply. This is a WP limitation.

    Instead, while looking at the page you want to edit, click the “Customize” button in the admin bar. Then go to “Layout > Sidebars” to adjust the layout.

    If you want a different sidebar layout for WooCommerce only, check out the first PHP snippet on this page: https://generatepress.com/knowledgebase/choosing-sidebar-layouts/#sidebar-filter

    Let me know if you need more info πŸ™‚

    #247886
    Damiaan van Vliet

    Hi Tom,
    I tried customize, layout, sidebar but sidebar is not visible.
    webshop

    Thanks.

    #247898
    Tom
    Lead Developer
    Lead Developer

    Which page are you trying to add the sidebar to? The home page?

    When you view the home page and click “Customize” (so you’re looking at the home page in the Customizer), what’s the “Layout > Sidebars” value set to?

    #247901
    Damiaan van Vliet

    content / sidebar
    shall I send you login details and set site in English language?

    #248011
    Tom
    Lead Developer
    Lead Developer

    Sure, no need to set it to English – I know my way around πŸ™‚

    #248017
    Damiaan van Vliet

    Send you login details, Tom. Thanks a ton!

    #248024
    Tom
    Lead Developer
    Lead Developer

    You have this added in your custom functions:

    /* hide sidebar on woocommerce pages */ 
    add_filter( 'generate_sidebar_layout','generate_custom_woocommerce_sidebar_layout' );
    function generate_custom_woocommerce_sidebar_layout( $layout )
    {
     	// If we are on a woocommerce page, set the sidebar
     	if ( is_woocommerce() )
     	 	return 'no-sidebar';
    
     	// Or else, set the regular layout
     	return $layout;
     }

    That will override the setting in the Customizer.

    #248198
    Damiaan van Vliet

    Great! That’s it! From a different shop I used some files.
    Thank you.

    #248338
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

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