title: "Remove Widgets" post_status: publish comment_status: open taxonomy: category: - elementor-developers-docs post_tag: - Widgets - Src - Repos


Remove Widgets

To remove existing widget developers can simply unregister existing widget by passing the widget name.

Hooks

To do that we need to hook to the elementor/widgets/register action which holds the widgets manager, and pass the widget name to the unregister() method.

Unregistering Widgets

To unregister existing widgets use the following code:

function unregister_widgets( $widgets_manager ) {

    $widgets_manager->unregister( 'widget-1' );
    $widgets_manager->unregister( 'widget-2' );

}
add_action( 'elementor/widgets/register', 'unregister_widgets' );