Archived topic
Disabling Sidebar on WooCommerce Cart Page
5 replies · Started by Josh on March 22, 2019
Hi, we'll be replacing the GP Woocommerce Cart page with an Elementor designed page.
In the meantime we'd like to remove the default sidebar. I don't see anything in the Customize menu to handle this.
Do you have an elegant solution? :) Thanks
Hi there,
You should be able to use this filter:
https://docs.generatepress.com/article/sidebar-layout/#using-a-function
And this conditional tag:
https://docs.woocommerce.com/document/conditional-tags/#section-8
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know if this helps :)
Thanks Leo..looked around on your links and ended up using this in Code Snippets:
add_filter( 'generate_show_default_sidebar_widgets', '__return_false' );
https://docs.generatepress.com/article/generate_show_default_sidebar_widgets/
That will do for now until we style up the new pages
Not sure why you would do that instead.
Glad you found a solution though.
>>Not sure why you would do that instead.
I never use the theme sidebars on my sites. For any site pages or posts that call for sidebars, I use Elementor sections that are split into Content / Sidebar columns.... then I build both columns out with inner sections.
That case you can disable the theme sidebar globally in the customizer:
https://docs.generatepress.com/article/sidebar-layout/