[resolved] Child Page Template Sidebar Below Content (6 posts)

  1. David686
    Posted 5 years ago #


    Just started with WordPress and have successfully got a child template and alternative sidebar to work. Unfortunately sidebar shows below content. Sure that this is a CSS problem but cannot find the correct bit. Have called the child template alicsur1-page.php is this the problem? Problem persists if I revert to sidebar.php instead of the alternative.

    All suggestions welcome.

  2. kmessinger
    Forum Moderator
    Posted 5 years ago #

    URL please.

  3. David686
    Posted 5 years ago #

    Sorry would help: http://www.dogrejuv.co.uk

    Have narrowed problem down to file name. Welcome page which works OK is running off a child version of sidebar-page.php but About Us page, which has the problem, is running off alicsur1-page.php. Code in both pages identical.

    Suspect that I am doing something really stupid; but what?

  4. Michael
    Forum Moderator
    Posted 5 years ago #

    Code in both pages identical.

    why do you use different files with identical code?

    the 'problem' lies in the way, Twenty Eleven deals with the sidebar formatting by adding the body_class .singular to templates without sidebar.
    for the 'sidebar-page.php' template, there is a part in the code that does not add the body_class .singular;
    in your child theme, you need to 'remove' this css class .singular for for any page templates that use the sidebar;

    example code:



    btw: your front page also has display problems (at least in FF3.6) possibly caused by one or more of these validation errors:


  5. David686
    Posted 5 years ago #

    Many thanks your code did the trick.

    By the way reason for identical code was to try and isolate the problem.

  6. itsbarry
    Posted 4 years ago #

    Filter worked great. Thanks alchymyth.

Topic Closed

This topic has been closed to new replies.

About this Topic