Remove sidebar from Woocommerce product pages

QuestionsCategory: Hello SerendipitousRemove sidebar from Woocommerce product pages
Phil Marinucci asked 4 years ago

How did you remove the sidebar from the single product pages?

1 Answers
Jennifer Staff answered 4 years ago

You can force full width on woocommerce pages by adding this code to the functions php file

//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’ );

Or if you only want it on a per product basis you can adjust the layout in each product edit screen just like a post or page.

Phil Marinucci replied 4 years ago

I added the code, but the theme sidebar is still showing up on product pages…