Techniques » Remove Widgets from Twenty Ten WordPress theme
So you want to remove some of the “stock” Widget Areas from the WordPress Twenty Ten theme, how do you go about doing this? We will be using the WordPress function unregister_sidebar(). It is accomplished with a few lines of code in your Twenty Ten child theme’s functions.php file. You are using a child theme, aren’t you?
First define a new function, we used remove_widget_area(). Inside this function we un-register the desired “stock” Widget Areas we don’t want or need. Twenty Ten comes with the following “stock” Widget Areas: primary-widget-area, secondary-widget-area, first-footer-widget-area, second-footer-widget-area, third-footer-widget-area and fourth-footer-widget-area.
1 2 3 4 5 6 7 | function remove_widget_area() { unregister_sidebar( 'secondary-widget-area' ); unregister_sidebar( 'first-footer-widget-area' ); unregister_sidebar( 'second-footer-widget-area' ); unregister_sidebar( 'third-footer-widget-area' ); unregister_sidebar( 'fourth-footer-widget-area' ); } |
We then initiate the new remove_widget_area() function using the add_action() WordPress function as shown below.
1 | add_action( 'admin_init', 'remove_widget_area'); |
Putting it all together yields the following code to be placed in your theme’s functions.php file:
1 2 3 4 5 6 7 8 9 | /* Remove "extra" Twenty Ten Widget Areas *******************************************************/ function remove_widget_area() { unregister_sidebar( 'secondary-widget-area' ); unregister_sidebar( 'first-footer-widget-area' ); unregister_sidebar( 'second-footer-widget-area' ); unregister_sidebar( 'third-footer-widget-area' ); unregister_sidebar( 'fourth-footer-widget-area' ); } add_action( 'admin_init', 'remove_widget_area'); |
It’s just that simple, now it’s your turn!


Seems like it should be easy to do, but I’ve looked at SOOOO many sites for advice on how to do this, and most of them are confusing me or not exactly addressing this need.
Can you tell me what to do? Visit the URL I’ve listed, scroll down to the bottom and you’ll see the (widget-driven) slide show that I want to position just below the horizontal nav bar. THANKS!
…from sidebar.php to either your header.php or index.php.
Make sure you create a sidebar.php in your child theme (with the above code removed.)