Cyber Week Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] Adding a sidebar to Home Page – which is Woocemmerce Shop

Home Forums Support Adding a sidebar to Home Page – which is Woocemmerce Shop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #400019
    Raymond

    Hello,

    I’m trying to add a sidebar to my home page which is the woocommerce Shop page. After trying all of the methods below, then going to Customize/Widgets the Sidebar does not display.

    Please advise, thank you!

    I have tried the following:
    Setting the Sidebar Layout to: Content/Sidebar;

    Adding the text below by using:
    Code Snippets;
    Adding directly to Parent via Customize/Aditional CSS;
    Adding to Child Theme/GeneratePress Child: Stylesheet (style.css)

    add_filter( ‘generate_sidebar_layout’,’tu_custom_woocommerce_sidebar_layout’ );
    function tu_custom_woocommerce_sidebar_layout( $layout )
    {
    // If we are on a woocommerce page, set the sidebar
    if ( function_exists( ‘is_woocommerce’ ) && is_woocommerce() )
    return ‘both-left’;

    // Or else, set the regular layout
    return $layout;

    }

    GP Premium 1.4.3
    #400084
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    No need for the function if you’re using the WooCommerce add-on. You can set the sidebar layout in Customize > Layout > WooCommerce.

    Let me know if you need more info 🙂

    #400119
    Raymond

    Too easy, Thanks!

    #400167
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.