Archived topic
Sidebar's Layout for Woo's "Shop" page
7 replies · Started by Dmitry Bychenko on July 4, 2016
hi, guys,
ive faced a problem when i cant change Sidebar Layout on WooCommerce's page "Shop".
WooCommerce creates 4 pages by default:
Cart
My Account
Checkout and
Shop
For pages Cart, My Account and Checkout it is possible to change default Layout,
https://www.dropbox.com/s/ayyxrl5n4nn9o5b/Woo-Shop.jpg?dl=0
but for Shop Page change Layout is not possible.
Whatever checkbox i choose, the result is always default Layout.
Is that possible to overwrite rules for this page?
for example, using Simple CSS plugin
Hi there,
You need to use the sidebar filter for the shop page.
More info here: https://generatepress.com/knowledgebase/choosing-sidebar-layouts/#sidebar-filter
Hello,
I'm working on an issue like this as well. I've added the code snippets plugin and tried adding the php code recommended in your link to show no sidebar on woo commerce category pages but nothing seems to happen.. I know how to modify css stylesheet a bit but never really played with php, guess it's time I learn! In fact I'd like to get the sidebar to not display at all on any woo commerce pages. Home, categories, products or cart. Is there any easy way to accomplish this? I am using the generate press child theme. Here is site on temp domain:
http://9bd.b89.myftpupload.com/
Thanks!
Can you show me the PHP snippet you're using?
This is what I put into code snippet. Didn't seem to bring any change.
add_filter( 'generate_sidebar_layout','generate_custom_category_sidebar_layout' );
function generate_custom_category_sidebar_layout( $layout )
{
// If we are on a category, set the sidebar
if ( is_category() )
return 'no-sidebar';
// Or else, set the regular layout
return $layout;
}
Instead of: is_category()
You want: is_woocommerce()
Make sure WooCommerce is activated first :)
This (https://docs.generatepress.com/article/sidebar-layout/#sidebar-filter) is wonderful! Just want to thank you for making these :)
I agree! I love filters :)
Glad you're enjoying them as well!