- This topic has 7 replies, 4 voices, and was last updated 8 years, 11 months ago by
Tom.
-
AuthorPosts
-
July 4, 2016 at 10:41 am #206490
Dmitry Bychenko
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
ShopFor pages Cart, My Account and Checkout it is possible to change default Layout,
https://www.dropbox.com/s/ayyxrl5n4nn9o5b/Woo-Shop.jpg?dl=0but 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 pluginJuly 4, 2016 at 11:00 am #206497Tom
Lead DeveloperLead DeveloperHi there,
You need to use the sidebar filter for the shop page.
More info here: https://generatepress.com/knowledgebase/choosing-sidebar-layouts/#sidebar-filter
August 21, 2016 at 9:17 am #220089Shane
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!
August 21, 2016 at 12:46 pm #220127Tom
Lead DeveloperLead DeveloperCan you show me the PHP snippet you’re using?
August 21, 2016 at 1:08 pm #220134Shane
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;}
August 21, 2016 at 6:04 pm #220231Tom
Lead DeveloperLead DeveloperInstead of:
is_category()You want:
is_woocommerce()Make sure WooCommerce is activated first 🙂
April 23, 2017 at 3:00 pm #309414naisyo523
This (https://docs.generatepress.com/article/sidebar-layout/#sidebar-filter) is wonderful! Just want to thank you for making these 🙂
April 23, 2017 at 7:33 pm #309465Tom
Lead DeveloperLead DeveloperI agree! I love filters 🙂
Glad you’re enjoying them as well!
-
AuthorPosts
- You must be logged in to reply to this topic.