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

---

# Remove Default Widgets

 *  [vintres](https://wordpress.org/support/users/vintres/)
 * (@vintres)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/remove-default-widgets/)
 * 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 7 replies - 1 through 7 (of 7 total)

 *  [jwalin](https://wordpress.org/support/users/jwalin/)
 * (@jwalin)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/remove-default-widgets/#post-1234237)
 * If you want to delete that widget then remove above code from funtions.php otherwise
   keep it as in same file.
 * Jwalin
 *  Thread Starter [vintres](https://wordpress.org/support/users/vintres/)
 * (@vintres)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/remove-default-widgets/#post-1234239)
 * sorry, what do I have to do?
 * I want to get rid of the default widgets, and that is why I read somewhere to
   INSERT that code, but I have no clue as to where and how?
 * any help is appreciated, thanks!
 * regards
    Vincent
 *  [jwalin](https://wordpress.org/support/users/jwalin/)
 * (@jwalin)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/remove-default-widgets/#post-1234311)
 * for that you have to remove that code nothing else
 *  [ecvis17](https://wordpress.org/support/users/ecvis17/)
 * (@ecvis17)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/remove-default-widgets/#post-1234636)
 * [@vintres](https://wordpress.org/support/users/vintres/) or anyone
 * I am using a sandbox theme and have a same wish/problem. I would like to know
   how to remove default widgets from the sidebar. I taught it can be done via backend
   edit widgets tool but it seem it cannot. There is nothing to drag out from the
   sidebar containers.
 * I also tried to find those lines within the /wp-content/themes/sandbox/functions.
   php
    but they don’t seem to e there. Does anyone know the way to remove these?
 * Here is the actuall [PHP file](http://fs09n1.sendspace.com/dl/9ec9f31177c3e3d4eda1946c9283b6ca/4c7be06f051968df/8lclef/functions.php)
 * Thank you very much.
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/remove-default-widgets/#post-1234637)
 * well, do you just want them gone? Thing is, if you plan to use the sidebar for
   your own widgets most sidebars are set up to display default widgets, but as 
   soon as you put your own widget in there, the default ones go away
 *  [ecvis17](https://wordpress.org/support/users/ecvis17/)
 * (@ecvis17)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/remove-default-widgets/#post-1234638)
 * [@rev](https://wordpress.org/support/users/rev/). Voodoo
 * Thank you. It Kind of works, but only if I put one new widget in each sidebar
   container.
    If I just put one then one default widget remains. It seems that 
   some of the default widgets correspond to on SIdebar1 and some to Sidebar2.
 * What is funny is that I would think that the SIdebar2 would be on the other side
   not within the same column?!
 * And finally what if don’t want any widgets, how do I remove the default ones 
   then?
    The only way I can think of is to #some_selector {display:none;} which
   is an ugly way I believe.
 * Thank you
 *  [ecvis17](https://wordpress.org/support/users/ecvis17/)
 * (@ecvis17)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/remove-default-widgets/#post-1234639)
 * @ forget about the last post.
    I found the sidebar.php where is the html of these.
   So it is enough to comment them out. 🙂 A bit better then the css way. But still.
   The space occupied by the sidebar itself remains even when empty. I would expect
   it to dynamically disappear when empty.
 * But that might be the thing of the Theme …
 * Bye

Viewing 7 replies - 1 through 7 (of 7 total)

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

 * 7 replies
 * 4 participants
 * Last reply from: [ecvis17](https://wordpress.org/support/users/ecvis17/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/remove-default-widgets/#post-1234639)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
