The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Consistent Sidebar

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #24718

    Can anyone tell me how to create a consistent sidebar on wordpress? You’ll see that is much shorter, I just want one sidebar for the entire site. I looked in the source code and I see most of the stuff isn’t in there, but I’m not sure how to change that.


    Not sure what you’re asking :?

    You just want the sidebar background to extend to the length of the main content? Then the simplest way is to repeat an image down the y-axis


    That’s a good tip, but that wasn’t my point.

    I want the sidebar on every page to have the same amount of content.

    Look here: and The content differs on the sidebar, I want the content to be the same. I’m not talking about the length of the sidebar and the content div, no.

    Simply the same amount of content in the side bar on all pages.



    There are two possibilities of what’s happening:

    1) Your sidebar.php file has php if statements that change the content depending on what page you are on. You’ll have to inspect the code.


    2) You’ve got two separate sidebar files that are being accessed from different types of pages. Sidebar.php is the normal sidebar file name, but you can have others like sidebar-*blah*.php where *blah* is any string.
    You should be able to just (back up and) delete these secondary file which will force WordPress to load the main sidebar.php file.

    I hope that helps,
    Ashton Sanders


    Ok, now we know what you want. :)

    Ashton is right. By the looks of it you are hacking the default theme, so if you have a good look at sidebar.php you will see that it is full of if statements such as


    Which basically means if you are on the front page or any other ‘page’ , as opposed to ‘posts’, ‘archives’, ‘categories’ etc. then show the blogroll.

    All you have to do is decide what you want in your sidebar and what you don’t want and then alter/remove those statements to suit.

    Hope that is more helpful than my last attempt. :D

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.