WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Can i unset available widgets? (3 posts)

  1. Leon Harris
    Member
    Posted 1 year ago #

    Hi all,

    i was wondering whether anyone knew how to unset the WooCommerce available widgets in Appearance > Widgets, so they don't confuse anyone (they're not needed on the site i'm working on).

    thanks in advance,
    Leon

    http://wordpress.org/extend/plugins/woocommerce/

  2. gregfuller
    Member
    Posted 1 year ago #

    Try putting this in your theme's functions.php file:

    function my_unregister_widgets() {
    	unregister_widget('WooCommerce_Widget_Recent_Products');
    	unregister_widget('WooCommerce_Widget_Featured_Products');
    	unregister_widget('WooCommerce_Widget_Product_Categories');
    	unregister_widget('WooCommerce_Widget_Product_Tag_Cloud');
    	unregister_widget('WooCommerce_Widget_Cart');
    	unregister_widget('WooCommerce_Widget_Layered_Nav');
    	unregister_widget('WooCommerce_Widget_Price_Filter');
    	unregister_widget('WooCommerce_Widget_Product_Search');
    	unregister_widget('WooCommerce_Widget_Top_Rated_Products');
    	unregister_widget('WooCommerce_Widget_Recent_Reviews');
    	unregister_widget('WooCommerce_Widget_Recently_Viewed');
    	unregister_widget('WooCommerce_Widget_Best_Sellers');
    	unregister_widget('WooCommerce_Widget_On_Sale');
    	unregister_widget('WooCommerce_Widget_Login');
    	unregister_widget('WooCommerce_Widget_Random_Products');
    }
    add_action('widgets_init', 'my_unregister_widgets');
  3. Leon Harris
    Member
    Posted 1 year ago #

    perfect, thanks Greg.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags