• Hello All.

    My sidebar disappeared the other day after I added my header logo, and some text widgets to the sidebar. I changed the header image in my style.css. I can see my sidebar on the main site: http://lucreziamagazine.com/popmycherry/ as well as pages and categories. But it is missing in individual posts.

    Here is the code I used:

    #header {
    background:url(http://lucreziamagazine.com/popmycherry/wp-content/uploads/2008/07/popmycherry1.jpg) repeat-x top left;
    height: 192px;
    width: 1008px;
    margin:0;
    padding-left:45px;
    font-family:Georgia, “Times New Roman”, Times, serif;
    font-weight:normal;
    font-size:0;
    }

    I tried to validate my css and it says it is missing the code : print.css, so not sure if this has anything to do with it.

    I also tried to find an error in the text/html widgets in my sidebar but can’t see one.

    Any help would be much appreciated.

    Thank you All in advance!

    DominaDollz

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    it looks like you forgot to put the

    <?php get_sidebar(); ?>

    code in your theme’s index.php

    Because the

    <div id="sidebar">

    is missing in every post’s source, i suppose this is not a style (css) issue but rather a theme issue.

    Thread Starter 730229

    Thank you. Where do I put this at? The theme came as is, and I didn’t change it. I’ll look in the theme and see if I can find it.

    Thread Starter 730229

    I just checked and:

    <?php get_sidebar(); ?>

    is included in the theme index.php

    Wonder what else it could be?

    Thread Starter 730229

    I just looked at my single post template single.php and it doesn’t have the <?php get_sidebar(); ?> in there, just the footer code. Should I add it there?

    Thank you!

    yes, i should have mentioned it, if there is a single.php file in your theme’s directory, it will overide index.php, then this is the page responsible for how your post’s pages look.

    So all the elements you want to show (like header, sidebar, footer) when viewing a post should be called for in single.php

    Try to copy index.php and rename it to single.php just to see if this fixes your missing sidebar.

    Thread Starter 730229

    Thank you. I added the <?php get_sidebar(); ?> code at the bottom of my single.php template and now it works!

    Much obliged!

    Great advice rmk80! Just saved me from an evening of head scratching.

    🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Sidebar Missing in Posts’ is closed to new replies.