• I’ve been trying to remove the sidebar on all woocommerce pages (shop, products, cart, account, etc.) and I’m unable. I’ve been able to do it before on other themes but I am stumped with the Klasik. So far I’ve tried adding code to function.php, tried removing sidebar code in archive-product.php and single-product.php pages and even tried display:none, which removed the sidebar but not the width space of the sidebar. Could you please tell me what code I need to add/remove for this to work? Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Lady,
    to remove the sidebar from Klasik theme, you can add this to your style.css:

    #sidebar.positionright div.widget-area {
        display: none;
    }
    
    .row .eight {
        width: 99.667%;
    }
    Thread Starter Deborah

    (@lady-m)

    Thank you kaniamea! I put that in my style.css and it still didn’t work, so I added .woocommerce ahead of it and it did.

    .woocommerce #sidebar.positionright div.widget-area {
        display: none;
    }
    
    .row .eight {
        width: 99.667%;
    }

    But then the sidebar was still showing up at the bottom, underneath the products, so I added:

    .woocommerce #sidebar{display:none;}

    and that took the sidebar away. However there still seems to be a margin or padding on the left side causing the page to not render center. If you have a moment, could you take a look to see what may be causing it? http://www.nadafarmlife.org/shop

    Thank you again!

    Thread Starter Deborah

    (@lady-m)

    Scratch that. When I went back to the home page, the sidebar had shot to underneath the posts so I had to remove your original code. Any other suggestions?

    Hi Lady,
    your homepage looks good to me. Do you still have any issue with it?
    Otherwise to center http://www.nadafarmlife.org/shop you could try this:

    article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
        display: block;
        padding-right: 25%;
    }

    Thread Starter Deborah

    (@lady-m)

    Thank you again but I tried that code on the shop page and it’s still displaying as if the sidebar width was there. The home page renders okay again because I removed your first recommendation.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Remove Woocommerce Sidebar’ is closed to new replies.