You can use the function unregister_widget
to remove widgets.
E.g. you can remove the Calendar widget with:
function my_widgets_init() {
unregister_widget( 'WP_Widget_Calendar' );
}
add_action('widgets_init', 'my_widgets_init');
To add widgets, use the Widgets API
.
Related Posts:
- changing wp-admin/widgets.php
- WordPress 4.8: Using multiple WYSIWYG-Editors with media inside of Widgets how to?
- How to Remove All Widgets from Dashboard?
- How can I delete all inactive widgets?
- Completely disabling widgets
- Elegantly using JavaScript on widget admin forms
- add_page_menu to make shortcut to widgets
- jQuery UI inside widget on admin page
- Add field to dashboard to update embedded URL on homepage?
- Dashboard Widgets – Add Admin Page With Same Functionality
- Drafts widget for admin page
- Grabbing how Many Posts by Month for a Dashboard Widget
- Validating widget’s configuration data on Admin page
- Custom widget is not appearing in the admin area
- How to remove Help tab and the Dashboard widget area’s empty border
- Widget page stopped loading
- Issue with checked() echoing on to page
- Handling dozens of sidebars
- Widget stuck at particular point when dragging to bottom
- Widget Areas Still Appearing in WP ADMIN When They Shouldn’t
- jQuery “on” handler does not fire on newly inserted widgets [closed]
- How to build widget with arrays inside arrays?
- How to listen to color changes on the color picker?
- Add New Footer Widget Area with Limited Options?
- Add div class to only one widget
- How to use control_callback when creating a widget via functions.php or plugin?
- Widget area inside a widget
- Defer Code in Widgets – Page Speed
- Where are widget configurations stored?
- How to limit wp_get_archives to show months for the X years only
- Bolding specific word(s)/parts of widget title
- Pass variables from one widget to another widget
- Remove the widgets tab from theme customizer
- How to hack recent comments default widget?
- Create a widget that allows text input
- How do I add a widget from an Android phone?
- Error gets thrown when calling require_once on widget.php
- Check if the current shortcode is being used in a widget
- How to activate or install the Gallery Widget?
- Custom User Field in Dashboard Widget
- Getting a div wrapped around two widgets
- How to create a widget that accepts html input?
- Widget changes in customizer ajax error to many options?
- Widgets not adding div on before and after title
- Dynamically add content to an existing widget area
- RSS dashboard widget not showing visuals
- Simple widget causing whitescreen
- How to stop comments widget conflicting with theme comments
- How do I create a widget to embed the code for a sign up form, so that the sign up form appears on every page?
- Tabs and Category Widget
- How to change the default class for the widget title?
- How to add the same widget twice?
- How to hide widget if current category has no posts assigned to it?
- Unable to load “wpColorPicker” on theme customize page
- Undefined Variable in my widget
- Update widget form after drag-and-drop “only specific plugin”
- Placing a widget with $wpdb query
- Loading the native WordPress image uploader in custom widget
- How to make widget appear conditionally
- Ampersand breaking Widget title
- How to allow editing of text in sidebar?
- Shortcode into widget
- Creating a dynamic class name in my custom widget
- Want to add more option in “Sexy Login”
- How to show avatar of current logged in user in a widget
- Got a problem with a widget
- Widget control – putting a slideshow in the widget area
- Wp-admin widgets have no title texts
- WordPress Local to Live and The Missing Widgets!
- delete widget upon uninstall
- Unable to see Widget Submenu under Appearance with Class Based WP_Widget
- How to update a widget data?
- Recently changed domain name. Home page widgets are now not in the customize menu yet still being on the page
- I accidentally added a widget area called sidebar 1
- wp_registered_widgets doesn’t contains my widgets
- How can I write this code snippet so that it echo’s the response when submitting empty fields?
- What is the difference between widget object and widget instance?
- How to retrieve category ID’s from widget settings?
- My plugin works in home page, but doesn’t work in post page
- Widget text color change
- How to make featured area?
- Checking if widget has title not working
- How to create another widgets.php page
- widget that will do shortcodes that user inputs
- Disable wordpress widget automatically on error
- Can I add a widget to the of my site?
- Widget dynamically add new input field
- WordPress function breaks widget’s markup?
- Registering multiple copies of a widget
- How do I stop out of stock items from appearing on my WooCommerce site when using the Layered Nav widget [closed]
- Single Widget Multi Sidebar
- menu in different page in different style
- Add text to Text Widget using Javascript
- Widget on home page displays wrong time compared to same widget on inside pages
- Subpages menu on sidebar plus widgets
- Widgets in PHP files?
- Text Widget Not Working
- Sample widget code which get data(1-5 record) from Wp_Admin panel and display to Homepage(WordPress Custom Theme)
- Can’t edit the widgets sidebar or footer
- Custom dashboard widget – load style only for added widget