Support » Fixing WordPress » Sidebar displaying below post or nor at all

  • Resolved hermitjim


    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael


    Forum Moderator

    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 available.

    also, before you make any edits to Twenty Eleven, create a child theme to work with.

    do not edit the default theme Twenty Eleven directly.

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

    Many thanks, will follow up on those

    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!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sidebar displaying below post or nor at all’ is closed to new replies.