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
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
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');perfect, thanks Greg.
You must log in to post.