Sidebar Disappears on Single Post Page…
-
Hello,
I’m in the process of altering the default theme for my blog and need some help.
My sidebar seems to come up blank on single post pages, archives, and categories.
I’ve made sure the get_sidebar tag is in the code for all of these pages, but still nothing.
You can check out my site, http://www.christinaperdue.com/wptest
Any help would be appreciated. Btw, I’ve posted what the top of my sidebar.php code looks like.
Thanks,
Christina[code moderated - irrelevant]
-
Well, that’s wierd. Check your single.php to make sure It’s doing the get sidebar bit.
If I bring up a single post and view the source the the sidebar div is there but it has nothing in it.
Yep, single.php has the get_sidebar code.
Does the same for me. The div is there, but it’s just blank. 🙁
That’s why beginners shouldn’t attempt to modify the default. It has different divs in the index.php (where the sidebar is visible) and the single.php – where it isn’t. Single.php having the “widecolumn” there just isn’t space for the sidebar… Compare the code and edit it.
I wouldn’t exactly call myself a beginner, but yea I figured it out a minute ago.
I deleted all the “if” statements in my sidebar.php code except for…
<?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar() ) : else : ?>
Works perfectly now. 🙂
Just for the sake of future searchers: it has nothing to do with the if statements in the sidebar. You have to replace “widecolumn” with narrowcolumn” in the single.php.
Ok, I have the same problem here. So I replaced “widecolumn” with “narrowcolumn” in the index.php file and I still cannot see the sidebar on single posts.
Any other suggestions?
Never mind, I figured it out.
The topic ‘Sidebar Disappears on Single Post Page…’ is closed to new replies.