Title: Default Widgets Unregister
Last modified: August 19, 2016

---

# Default Widgets Unregister

 *  [vintres](https://wordpress.org/support/users/vintres/)
 * (@vintres)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/default-widgets-unregister/)
 * Hi there,
 * I am trying to get rid of some of the default widgets that come with my theme…
   like on the sidebar. I found the following code:
 *     ```
       add_action( 'widgets_init', 'my_unregister_widgets' );
   
       function my_unregister_widgets() {
       	unregister_widget( 'WP_Widget_Pages' );
       	unregister_widget( 'WP_Widget_Calendar' );
       	unregister_widget( 'WP_Widget_Archives' );
       	unregister_widget( 'WP_Widget_Links' );
       	unregister_widget( 'WP_Widget_Categories' );
       	unregister_widget( 'WP_Widget_Recent_Posts' );
       	unregister_widget( 'WP_Widget_Search' );
       	unregister_widget( 'WP_Widget_Tag_Cloud' );
       }
       ```
   
 * But I have no clue what to do it? Should I insert it to my functions.php and 
   if yes, where exactly? Do I have add any code or opening tags for php , etc?
 * Sorry to ask these types of question. I have no php background, just trying to
   desperately put up my blog.
 * regards
    thanks,
 * Vicnent

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/default-widgets-unregister/#post-1235109)
 * Am I missing something. Just remove the Widgets via Appearances->Widgets so they
   don’t show in your sidebar.

Viewing 1 replies (of 1 total)

The topic ‘Default Widgets Unregister’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/default-widgets-unregister/#post-1235109)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
