WordPress.org

Ready to get started?Download WordPress

Forums

Keeping the Sidebar visible at all times (6 posts)

  1. clarke1866
    Member
    Posted 9 years ago #

    Greetings all,

    On a default installation of 1.5, how can I keep the sidebar visible at all times. For example, when viewing an individual post, the contents of the sidebar are not loaded. There are instructions on how to do this for 1.2x, but seemingly not for 1.5. Any help would be greatly appreciated.

    Clarke

  2. orangeguru
    Member
    Posted 9 years ago #

    You have to include the sidebar.php in your template for individual posts. Looks like this:

    <?php include "sidebar.php"; ?>

  3. Nick Momrik
    Member
    Posted 9 years ago #

  4. clarke1866
    Member
    Posted 9 years ago #

    Thanks for the prompt responses! However, there is some key piece of information I am missing. I understand that the sidebar needs to be included in order to show up. What I don't understand is how wordpress knows when to include it and when not too. I am assuming this is directly related to the IF statements in the index.php -- the loop? Am I close?

    I can't seem to find the right place to include the sidebar.php file in the index.php without mucking everything else about.

    Again, 1000 thankyous. to all who can help!

    Clarke

  5. Kafkaesqui

    Posted 9 years ago #

    Depends on how a theme is set up.

    If a theme only has an index.php and no additional templates for single, archive, category etc., you would have to provide if/else functionality for it if you only want it to appear on certain areas of your blog. If the theme does have template files for various page types, add:

    <?php get_sidebar(); ?>

    to those templates you want it to display in/with.

    Note that with the default theme you'll have a bit more work than this, since it's designed with no sidebar in mind for the supplementary templates. See this for more:

    http://wordpress.org/support/topic.php?id=25019#post-140992

  6. clarke1866
    Member
    Posted 9 years ago #

    I think I get what is being suggested. However, right now it is just trial and error as to where to place the include for the sidebar. Is there a way to step through the code much like I would back in the days when I used to write VB? This would allow me to actually visualize how this is working.

    BTW I have been messing with the kubrick default theme... I hope that is what the other members who have read what I have written understood.

    Clarke

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.