WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar not appearing on page.php template (4 posts)

  1. databell96
    Member
    Posted 5 years ago #

    This is odd. I just looked at my 'Hello World' post at http://www.bordwayphotography.net/2008/11/30/hello-world/ and for some reason, it's not making the call to get_sidebar even though it's in the page.php code in my theme. How do I correct this?

  2. David Borrink
    Member
    Posted 5 years ago #

    data,

    Since you're dealing with a post, the "page.php" file has nothing to do with this.

    This looks like the usual "single" post page which doesn't include the sidebar. When you click on a title in a post, it uses the "single.php" template which is based on "widecolumn" css settings and obviously doesn't have a sidebar call in it.

    So looking at your page.php code isn't going to help you.

    You can modify the "single.php" template to add the sidebar to single posts. Just make sure the the content class is the same one that index.php uses. Index.php is what your normal blog pages are based on.

    I'm basing all these statements on what the default theme does, so if your theme is similar to the default theme's structure, I bet this is probably what you have to do.

  3. databell96
    Member
    Posted 5 years ago #

    Ah, that clears it up. Just made the changes to single.php and it's all good. Thanks.

  4. David Borrink
    Member
    Posted 5 years ago #

    Looks good. You definitely made the right tweaks. Glad to help.

Topic Closed

This topic has been closed to new replies.

About this Topic