最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

woocommerce offtopic - Removed Sidebar in single product page

programmeradmin2浏览0评论

Hi Guys I have some problem regards removing the sidebar on my single product page,

I look for some php code to get rid of it but nothing works for me.

>     /**  * @snippet       Remove Sidebar @ Single Product Page  * @how-to        Watch tutorial @ /?p=19055 
> * @sourcecode    /?p=19572  * @author        Rodolfo Melogli  * @testedwith    WooCommerce 3.2.6  */   add_action(
> 'wp', 'bbloomer_remove_sidebar_product_pages' );   function
> bbloomer_remove_sidebar_product_pages() { if ( is_product() ) {
> remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
> } }

inserting this code on my funtion.php but nothing happens I used avada for my theme.

I manage to removed the sidebar but the products image and description stay on the right side of the page.

for more info please see image :

You can check the page here: /

I hope someone can help me with this thank you.

Hi Guys I have some problem regards removing the sidebar on my single product page,

I look for some php code to get rid of it but nothing works for me.

>     /**  * @snippet       Remove Sidebar @ Single Product Page  * @how-to        Watch tutorial @ https://businessbloomer/?p=19055 
> * @sourcecode    https://businessbloomer/?p=19572  * @author        Rodolfo Melogli  * @testedwith    WooCommerce 3.2.6  */   add_action(
> 'wp', 'bbloomer_remove_sidebar_product_pages' );   function
> bbloomer_remove_sidebar_product_pages() { if ( is_product() ) {
> remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
> } }

inserting this code on my funtion.php but nothing happens I used avada for my theme.

I manage to removed the sidebar but the products image and description stay on the right side of the page.

for more info please see image : https://ibb.co/k9qtfxB

You can check the page here: http://sumuri2.us.tempcloudsite/product/customize-your-workstation/

I hope someone can help me with this thank you.

Share Improve this question asked Jul 10, 2019 at 13:17 Aj Dalore AndangAj Dalore Andang 1
Add a comment  | 

1 Answer 1

Reset to default 0
function remove_sidebar( $is_active_sidebar, $index ) {
if( ! is_product() ) {
return $is_active_sidebar;
}
return false;
}
add_filter( 'is_active_sidebar', 'remove_sidebar', 10, 2 );
发布评论

评论列表(0)

  1. 暂无评论