Remove Sidebar from Checkout, Cart and Product Page
May 2014 WordPress Theme
- GK User
- Fri May 29, 2015 10:09 am
Hello Gavick Team,
i´m new in Wordpress and Woocommerce.
I would like to remove the Woocommerce Sidebar from is_checkout() | is_cart() and from is_product page.
I think it´s possible with some code in the template file function.php.
I have tested this code in the function.php from the community:
function so_25700650_remove_sidebar(){
if( is_checkout() || is_cart() || is_product() ){
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
}
}
add_action('woocommerce_before_main_content', 'so_25700650_remove_sidebar' );
But it doesnt work...
Could you help me please?
Thanks!
Christian
Wordpress 4.2.2
Woocommerce 2.3.9
Gavick Storefront 1.4
i´m new in Wordpress and Woocommerce.
I would like to remove the Woocommerce Sidebar from is_checkout() | is_cart() and from is_product page.
I think it´s possible with some code in the template file function.php.
I have tested this code in the function.php from the community:
function so_25700650_remove_sidebar(){
if( is_checkout() || is_cart() || is_product() ){
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
}
}
add_action('woocommerce_before_main_content', 'so_25700650_remove_sidebar' );
But it doesnt work...
Could you help me please?
Thanks!
Christian
Wordpress 4.2.2
Woocommerce 2.3.9
Gavick Storefront 1.4
-
- Fresh Boarder
- GK User
- Fri May 29, 2015 10:18 am
Sorry i mean "functions.php"...
-
- Fresh Boarder
- GK User
- Fri May 29, 2015 11:52 am
Hello,
I think that it will be easier to use i.e. Widget Logic plugin for widget on your woocommerce sidebar and put the conditional tags there:
I think that it will be easier to use i.e. Widget Logic plugin for widget on your woocommerce sidebar and put the conditional tags there:
- Code: Select all
!is_checkout() && !is_cart() && !is_product()
-
- Moderator
- GK User
- Fri May 29, 2015 3:16 pm
great! thanks!
-
- Fresh Boarder
4 posts
• Page 1 of 1