Archived topic
Right Side Bar Woo Commerce
18 replies · Started by Cassie Thomas on May 11, 2015
Hi Tom,
I'm having trouble removing the right side-bar from my woo commerce page. I used the filters that you've posted in this link but neither of these worked.
http://generatepress.com/knowledgebase/choosing-sidebar-layouts/
I also have a plugin that you recommend that allows me to hide the widgets in the side bar, but these don't seem to work either. Any other suggestions?
The page in questions is
http://amhersthall.com/shop/
That doesn't look like the default WooCommerce page - it looks like a regular page with a shortcode?
If it is, edit the page, and change the sidebar layout using the metabox: generatepress.com/knowledgebase/choosing-sidebar-layouts/#metabox
Let me know :)
It's whatever the default page was created when I first setup the plugin. I did not paste any shortcode into the page. I have the metabox set to content (no sidebar) and I pasted the fliter into the custom CSS Jetpack link.
Still nothing changed...
Ahh, the filter PHP can't be added into CSS.
Instead, you'll have to add it using one of these options: http://generatepress.com/knowledgebase/adding-php-functions/
Still no luck. I used Code Snippet plugin like you recomended to add the filter. One filter put the right sidebar on the left side of the page and the store on the other side, just swapped it and added a few more widgets (a random search box). The other filter did nothing. I used the Jetpack widget visibility to turn off both the archive and the categories widgets but that also does nothing. They remain visible. I played around with the Quick Edit's Template: Default Template and made sure that the Gift Shop was set to content (no sidebars). I've even used some other suggestions but ended up getting a fatal error. So i'll stay away from that for now. I've ran out of things to test and snippets to try. Any last sugestions?
This snippet should really work - if it doesn't, can you send me temporary admin login details so I can see why?
add_filter( 'generate_sidebar_layout','generate_custom_woocommerce_sidebar_layout' );
function generate_custom_woocommerce_sidebar_layout( $layout )
{
// If we are on a woocommerce page, set the sidebar
if ( is_woocommerce() )
return 'no-sidebar';
// Or else, set the regular layout
return $layout;
}
I've sent password and username access to noreply@generatepress.com will that work?
Ignore the last post I sent it to support@generatepress.com
Looks like the apostrophes in the code copied over to your snippets kind of messed up.
I fixed them and it seems to be working now :)
Thanks! I thought I was loosing it there for a moment.
No problem! :)
Hello Tom,
I am having problems removing the right sidebar from the shop page. It keeps displaying my blog page titles/categories. I have been at it for hours and no luck. Please advise.
Thanks
so you've tried Tom's code here (https://generatepress.com/forums/topic/right-side-bar-woo-commerce/#post-107413) but it's not working? Any chance of link to your site?
Sure here it is http://www.jopaulo.com/shop/
Thanks
How are you adding the code?