• Resolved garthman

    (@garthman)


    Hi all-
    I’m a small town generalist web designer/developer who is new to WordPress but experienced with PHP and MySQL. A few of months ago, I set a my own blog using WordPress. It’s at <http://garthhagerman.com/blogland/index.php&gt;. I used the default theme and modified the style sheet and sidebar.php so that the look is consistent with the rest of my site and the navigation connects to the rest of the site.
    My problem is with the single post archive pages, such as <http://garthhagerman.com/blogland/archives/60&gt;. Those pages have no navigation at all, but I want them to have the same navigation as the index page and the monthly archives. This is particularly important, since these single post archive pages are where a new site visitor is most likely to enter the site after a Google search. When I look for the code to make the change, I get lost in a sea of includes and theme scripts. How can I change which file to use the sidebar.php file which has the site navigation on the single post archive pages?

Viewing 5 replies - 1 through 5 (of 5 total)
  • [I changed your title to reflect what you really asked!]

    That’s how the Default theme has been designed (and many of its clones).
    You will need to compare the index.php and the single.php and make the necessary changes in the latter to make it to behave the same way. E.g. to add the call for the sidebar template AND (important!) replace the wide column with the narrow column, etc.

    Thread Starter garthman

    (@garthman)

    Ah, the magic file is single.php. A couple of changes there and all is well. Thanks. I’m puzzled, though as to why it’s considered desirable for the single post pages to lack any navigation… but that’s probably a discussion for some other forum.

    Just wanted to add to this and say thanks a million, very helpful. Just made the change myself in 2 minutes.

    Paul

    Looking at the two files the differences are:

    1) Change the line near the top of single.php from

    <div id=”content” class=”narrowcolumn”>

    to

    <div id=”content” class=”widecolumn”>

    2) Add this line immediately above the final line

    <?php get_sidebar(); ?>

    so that your final two lines are:

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Thanks for fix “pcoghlan65”. I changed mine from “widecolumn” to “narrowcolumn” though.

    Yeah I think he meant to change widecolumn to narrowcolumn…. that is what I did also.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘adding sidebar to single post view’ is closed to new replies.