-
-
Save nutsandbolts/f141c7563a9ec9f585e7 to your computer and use it in GitHub Desktop.
Remove sidebar on Woo pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Remove sidebar on WooCommerce pages | |
add_filter( 'genesis_site_layout', 'nabm_woocommerce_layout' ); | |
function nabm_woocommerce_layout() { | |
if ( nabm_is_woocommerce() ) { | |
return 'full-width-content'; | |
} | |
} | |
function nabm_is_woocommerce() { | |
return is_shop() || is_product_taxonomy() || is_page( array( 'my-account', 'cart', 'checkout' ) ) || is_product(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment