Remove sidebar from Woocommerce product pages 2
I applied the following code to prevent the sidebar from appearing on product pages, but the theme sidebar is still showing up…
//Full Width Pages on WooCommerce
function hyd_cpt_layout() {
if( is_page ( array( ‘cart’, ‘checkout’ )) || is_shop() || ‘product’ == get_post_type() ) {
return ‘full-width-content’;
}
}
add_filter( ‘genesis_site_layout’, ‘hyd_cpt_layout’ );
Once Woo takes over product pages, there doesn’t seem to be a way to tell it to go full screen in the settings.
Here’s an example where the sidebar is still showing up after adding the code…
http://lisaaquilina.ca/product/product-1/
Thanx, Phil.
After you added it, did you be sure to clear any hosting cache that you may have? Do you have the Genesis Connect for Woocommerce plugin installed? Without that genesis and woocommerce do not speak to each other. When that is installed, you will see a spot to change the layout on each product page when in the editor. That code though should have removed the sidebar from all product pages. Do you mind if I log on to the site again?
Oh I completely forgot about that plugin. Working now, thanx so much!
Please login or Register to submit your answer