Forums

[resolved] Sidebar Disappears on Single Post Page... (8 posts)

  1. christina1229
    Member
    Posted 1 year ago #

    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]

  2. minute44
    Member
    Posted 1 year ago #

    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.

  3. christina1229
    Member
    Posted 1 year ago #

    Yep, single.php has the get_sidebar code.

    Does the same for me. The div is there, but it's just blank. :(

  4. moshu
    Member
    Posted 1 year ago #

    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.

  5. christina1229
    Member
    Posted 1 year ago #

    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. :)

  6. moshu
    Member
    Posted 1 year ago #

    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.

  7. bluelotus
    Member
    Posted 1 year ago #

    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?

  8. bluelotus
    Member
    Posted 1 year ago #

    Never mind, I figured it out.

Topic Closed

This topic has been closed to new replies.

About this Topic