Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

storefront remove sidebar from product page

// removes sidebar from product page (storefront based theme)
function pk_remove_sidebar_product_pages() {
    if ( is_product() ) {
        remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
    }
}
add_action( 'get_header', 'pk_remove_sidebar_product_pages' );
 
PREVIOUS NEXT
Tagged: #storefront #remove #sidebar #product #page
ADD COMMENT
Topic
Name
7+3 =