[Resolved] Woocommerce Shop page sidebar

Home Forums Support [Resolved] Woocommerce Shop page sidebar

Home Forums Support Woocommerce Shop page sidebar

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #654642
    Leo
    Staff
    Customer Support

    Hi Daan,

    Any chance you can open a new topic for your question?

    Thanks 🙂

    #657715
    Daan van

    Of course!

    #1852398
    Gregor

    Hi,

    filters like this will come in handy in this and many other situations.

    function generate_construct_sidebars() {
        $layout = generate_get_layout();
    
        // When to show the right sidebar.
        $rs = array( 'right-sidebar', 'both-sidebars', 'both-right', 'both-left' );
    
        // When to show the left sidebar.
        $ls = array( 'left-sidebar', 'both-sidebars', 'both-right', 'both-left' );
    
        // If left sidebar, show it.
        if ( in_array( $layout, $ls ) ) {
            get_sidebar( applly_filters('generate_left_sidebar_name','left') );
        }
    
        // If right sidebar, show it.
        if ( in_array( $layout, $rs ) ) {
            get_sidebar( apply_filters('generate_right_sidebar_name', null));
        }
    }
Viewing 3 posts - 16 through 18 (of 18 total)
  • You must be logged in to reply to this topic.