Site logo

Archived topic

Right Side Bar Woo Commerce

18 replies · Started by Cassie Thomas on May 11, 2015

Viewing posts 1–15 of 19

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...

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;

 }

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

How are you adding the code?

This archived topic is closed to new replies.