woocommerce single product page full width

Home Forums Best Commerce woocommerce single product page full width

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2793
    Anonymous
    Inactive

    Hi,

    I removed sidebar for single product page with the following function:

    /* remove single product sidebar */
    function woocommerce_remove_sidebar_shop() {
        if( is_product() )
           remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
    }
    add_action( 'template_redirect', 'woocommerce_remove_sidebar_shop' );

    But unfortunately white sidebar still existing and I did not figure out how to set single product page with full width. I tried some css what I found on none of them helps.

    Hopefully you could help me with this 🙂

    #2797
    Axle Support
    Moderator

    Hello @Ziil

    You don’t have to customize codes for this, just go to Customizing â–¸ Theme Options
    Layout Options
    and choose Global Layout as no sidebar

    Hope this will solve your requirement.

    Regards
    Support Team

    #2810
    Anonymous
    Inactive

    Thank you for your answer! I need primary sidebar to display subcategories in category view. But if to open single product then I would like to display this product with full width without sidebar.
    Hope that there is some easy hack for that 🙂

    #2839
    Axle Support
    Moderator

    Hello Zill

    Here is CSS fixing for your single product page to display full wight without sidebar.
    Just add this css on your Customizer -> Additional CSS section.

    .single-product #primary {
        width: 100% !important;
    }
    
    .single-product #sidebar-primary {
        display: none !important;
    }

    Hope this will solve your problem.

    Regards
    Support Team

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