Created
February 18, 2015 05:48
-
-
Save jamiemarsland/3835778210966604defa to your computer and use it in GitHub Desktop.
Make WooThemes Storefront product pages full width
This file contains hidden or 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
add_action( 'get_header', 'remove_storefront_sidebar' ); | |
if ( is_product() ) { | |
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 ); | |
} | |
} |
Snap, I just found the same as sjoerdfaerber
function remove_storefront_sidebar() {
if ( is_product() ) {
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
}
}
add_action( 'get_header', 'remove_storefront_sidebar' );
Updated gist (also adds a variation to use to force ALL pages fullwidth):
https://gist.github.com/srdco/fa852ebe33bde0e42d7e5834ac7ca61a
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You forgot to put in a function:
add_action( 'get_header', 'remove_storefront_sidebar' );
function remove_storefront_sidebar(){
if ( is_product() or is_product_category() ) {
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
}