Skip to content

Instantly share code, notes, and snippets.

Last active March 24, 2021 13:36
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Unregister WordPress, Genesis, and WooCommerce widgets Raw
//Don't copy above.
add_action('widgets_init', 'cabeymer_unregister_widgets', 10);
* Unregister Various Widgets
* Clean up your widgets.php page
* Single comment out the ones you want to keep
function cabeymer_unregister_widgets() {
$unregister_widgets = array(
//* Keeping Core
//* --- Genesis ---
//* --- WooCommerce ---
//* Keeping Woo
// 'WC_Widget_Product_Search',
//* --- Other Widgets added by plugins ---
foreach ($unregister_widgets as $w):
} //* end cabeymer_unregsister_widgets();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment