TwentyTen - Widgets deletion

Hi everyone,

I’m trying to delete the ‘Search bar’ and the Meta login from the Sidebar of the TwentyTen theme I’m trying to modify:

I thought I would have to delete these at the Widgets Menu, but as you can see there is no Widget there:

does this mean that the sidebars are no widgets? How would I go about and deleting these parts of the sidebar so I can start adding my own stuff there?

Go to sidebar.php file and make the changes

Thanks for your reply, but aren’t it also widgets, so why can’t I delete them from the Widgets menu? Or am I totally wrong here?

Since there are no widgets added, it defaults to the theme’s hard-coded sidebar. Add a widget and it will show only the widgets you add.

you can modify widget by going in wp-admin area>Widget
You can remove to change location of your widget from easy drag and drop option.

Hi Nielz,

Like what php_daemon has mentioned. By default, wordpress will show a search box, archives and meta if there are no widgets in your sidebar.

To change the default settings, you need to change the codes in sidebar.php

The Wordpress with the Twenty-Ten theme first attempts to display “dynamic widgets” which are not located in the sidebar. In fact, the dynamic widget template code is not in the templates at all. It’s in widgets.php–I think.

I had a frustrating experience with this yesterday. I wanted to remove the “Meta” section from my custom template. I am the only one logging in, so I don’t want anyone seeing any login stuff or anything else in the Meta. So, i took the relevant code out of sidebar.php. To my surprise, the Meta section was still in the sidebar. After some frustrating digging, I realized that the widget template code in sidebar.php only runs if the call to the dynamic widgets function fails. I had to delete the Meta section in the Wordpress widgets admin panel to get rid of it once and for all.

From sidebar.php

<?php
	/* When we call the [B]dynamic_sidebar() function, it'll spit out
	 * the widgets[/B] for that widget area. If it instead returns false,
	 * then the sidebar simply doesn't exist, so we'll hard-code in
	 * some default sidebar stuff just in case.
	 */
	if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>