Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gcman105/eb47db9baaa8ea2288a6e6b7f29a9ea7 to your computer and use it in GitHub Desktop.
Save gcman105/eb47db9baaa8ea2288a6e6b7f29a9ea7 to your computer and use it in GitHub Desktop.
Remove sidebars from woocommerce on genesis childthemes
<?php
//do not copy above opening php tag when pasting into a functions.php file
//Full Width Pages on WooCommerce
function themeprefix_cpt_layout() {
if( is_page ( array( 'cart', 'checkout' )) || is_shop() || 'product' == get_post_type() ) {
return 'full-width-content';
}
}
add_filter( 'genesis_site_layout', 'themeprefix_cpt_layout' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment