Home » PHP

WordPress: Sidebar not showing up on WordPress 2.9+

22 January 2010 No Comment

I noticed with the latest version of WordPress, an older template may not display the sidebar correctly. If you look at the source code, you notice a lot of HTML code is missing in the sidebar div. The easiest fix I found was to update the “sidebar.php” file in the template. A lot of themes should have the !function_exists(‘dynamic_sidebar’) in the sidebar.php file.

In the following code:

if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('south_sidebar') ) :

Remove the ! from the function_exists portion. This should allow the “original” sidebar to display properly. It should look something like:
 
if ( function_exists('dynamic_sidebar') || !dynamic_sidebar('south_sidebar') ) :

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.