• Resolved michaeltaube

    (@michaeltaube)


    Hello there,

    I’m using Woocommerce with the Colormag Free Theme. I created a child theme and copied the singe-product.php and archive-product.php to a woocommerce folder in that theme and then removed the call of the function to show the sidebar.

    I also edited the functions.php in my child theme folder but I didn’t work neither.

    This is how my funtions.php looks in the end

    
    add_action( 'widgets_init', 'wpb_widgets_init' );
    
    function disable_woo_commerce_sidebar() {
    	remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10); 
    }
    add_action('init', 'disable_woo_commerce_sidebar');
    ?>
    
    I’m looking forward to your suggestions.
    

    Kind Regards,
    Michael

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Colormag has already removed the woocommerce sidebar in its functions.php at line 795, so the sidebar that you are seeing is the Colormag sidebar.

    What happens if you turn off the Colormag sidebar at:
    Dashboard > Appearance > Customize > Design Options > Default layout for single posts

    You may need to revert your custom template to the original for it to work.

    Thread Starter michaeltaube

    (@michaeltaube)

    Thank you. That did the trick for me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove Woocommerce Sidebar’ is closed to new replies.