Disable Sidebar in the Product Page in Storefront Theme [closed]
IT Nursery
May 29, 2022
0
I am using storefront theme, where there is options for the Full Width in the pages but not in the Product Page and Product Category Page in the Store Front Theme
As i played with css and i go this line in the template
<div id="primary" class="content-area">
As i removed the content-area class i can able to remove the space of the sidebar, but that is not what i was expected, because it is removing sidebar in whole website
I need to remove it only in product page but not in product-category page, how this can be achieved in the storefront theme
2 Answers 2
for product page, you can put in functions.php
function remove_storefront_sidebar() {
if ( is_product() ) {
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
}
}
add_action( 'get_header', 'remove_storefront_sidebar' );
It works with latest woocommerce 2.5.2
Also CSS is needed: