Written by on

Why Everything in Your Sidebar Disappears When You Add a WordPress Widget

By Jesse Petersen

FAQ from the iThemes.com Community Support Forum

Scenario: You installed a brand-new, shiny copy of your iThemes premium theme and want to get your widgets installed in the sidebar(s). As soon as you add a widget in a sidebar to, say add a text widget above the existing built-in widgets, all of the widgets disappear except the new text widget you added.

Why Did it Do That?

Sidebar codeWhat happened is a simple result of the code doing what it is told to do, which is to either show the built-in widgets (all of them) or show the widgets selected on the Widget screen under the Design tab.

I am going to get a tad technical here for those who are interested. If that is not you, then feel free to skip to the next section for what to do regardless of why things happen.

Looking at the code to the right, locate the “dynamic_sidebar” code. That is what you will find in every “widget-ready” theme because it calls out the function.php code included in the theme, which can include 1, 2, 3, or any number of widgeted sidebars or areas in the theme. This particular code is affecting a sidebar named Post Sidebar, which is created in the function.php file and filled with widgets by going to Design->Widgets and selecting the Post Sidebar area from the pulldown on the right side under Current Widgets.

The way to read this code in plain English is, “If the function.php file includes a sidebar called ‘Post Sidebar,’ then ignore all the code until the ‘end if’ statement IF there are widgets selected on the Design->Widgets page.” If there are no widgets manually selected in editing page, then the code below rules and appears. If only one widget is added, then it, and only it, will appear in the sidebar due to the nature of the If/Then statement.

How to Fix It

Widgets in placeWidget tabNavigate to the Design tab and click ‘Widgets.’ On the left side of the page, every widget included with WordPress and added by widget plugins that you have added is listed with and ‘Add’ button to add that widget to the sidebar selected in the pulldown on the right side of the page. Many widgets come straight out of the box fully functioning with no customizing options. Others allow you to edit items, such as the widget title, after you Add it and make the changes to it over on the right side. The Text widgets are able to be added numerous times to multiple sidebars to allow multiple text widgets throughout a site.

To review one property of widgets quickly for those who skipped the previous section, when you select a widget, all of the pre-coded widgets in the theme’s sidebar you changed will disappear. If you want to keep the ones already present and add more widgets, then you must include those already present to still see them.

Click the Edit button on any widget that you want to or need to change or add information to, such as a Feedburner ID or RSS feed address and click Save Changes to set that sidebar’s settings. From there, you can move on to other sidebars or leave them set as default, unaffected by this sidebar’s settings.

Comments

  1. Allthough most of this stuff is new to me, I do understand more or less whta you are saying about disappearing widgets.
    Your solution however does not work for me because even my admin login in the sidebar disappeared. How can I log in to my dashboard?

  2. You can always go to /wp-admin after your blog’s address in the address bar to log in. It is very rare to find a blog with the login widget installed, but that is where it takes you.

  3. I’m sorry, I didn’t find this helpful either because I didn’t want to wipe the sidebar and couldn’t find the Design Tab and when I found widgets I didn’t see “Add This” as a plugin option!

Respond

×

Sale Ends Today! Save 35% OFF BackupBuddy with coupon code BACKUPWP35