WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sidebar displaying below post or nor at all (4 posts)

  1. hermitjim
    Member
    Posted 2 years ago #

    Scratching my head over why the sidebar should've disappeared from single posts. <?php get_sidebar(); ?> was missing from single.php, so I added it , but that made the sidebar display below the post body.

    I had a look at page.php to see if I could get any clues. I found that page.php doesn't call get_sidebar() either, but still manages to display it. So now I'm really confused.

    Where is page.php getting the sidebar from? And how come single.php isn't doing the same?

    Example broken post
    Example working page

    Many thanks for your help.

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    you are dealing with the default behaviour for Twenty Eleven theme.

    single posts do not have a sidebar.
    for static pages, there is the 'sidebar template' page template which you seem to be using for your example page.

    there are a few forum topics how to correct that - please try and use the forum search.

    there is also a plugin http://wordpress.org/extend/plugins/twenty-eleven-theme-extensions/ available.

    also, before you make any edits to Twenty Eleven, create a child theme to work with.
    http://codex.wordpress.org/Child_Themes

    do not edit the default theme Twenty Eleven directly.

    if you get stuck with particular implementations, please post here again.

  3. hermitjim
    Member
    Posted 2 years ago #

    Many thanks, will follow up on those

  4. hermitjim
    Member
    Posted 2 years ago #

    Just to close this - problem solved with a child theme found here

    I didn't realise it was default behaviour - a feature, not a bug! - and hence my searches here and on Google were badly phrased.

    Many thanks for your swift and patient assistance!

Topic Closed

This topic has been closed to new replies.

About this Topic