WordPress.org

Ready to get started?Download WordPress

Forums

left sidebar (18 posts)

  1. webwitch
    Member
    Posted 3 years ago #

    I'd like to create a new template and add a left sidebar. Is this possible?
    Thank you for any help.

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    yes, this is possible; done here for instance.

    it needs a basic understanding of html, css, and php; and a few wordpress functions.

    the example is keeping the original width of the theme.
    because it is quite a few lines of code, see:
    http://wordpress.pastebin.com/29EuE02v

    reading:
    http://codex.wordpress.org/Pages#Page_Templates
    http://codex.wordpress.org/Function_Reference/register_sidebar
    http://www.w3schools.com/css/css_positioning.asp

  3. webwitch
    Member
    Posted 3 years ago #

    Thanks, that's very helpful. I have managed to this with another theme a while ago but the 2010 styling threw me a bit so wasn't too sure.

    I basically want to add a left sidebar to include section navigation.

  4. webwitch
    Member
    Posted 3 years ago #

    I have now followed the instructions successfully and have my new 3 column template.

    I would now like to make this my default template. I have tried changing the css code etc but ended up with a bit of a mess. Any advice would be appreciated.

    Thanks.

  5. webwitch
    Member
    Posted 3 years ago #

    Only problem is that the 3 column template doesn't render in IE6. The left sidebar doesn't show at all. Any ideas please?

  6. baszer
    Member
    Posted 3 years ago #

    ie6 sucks big time.

    but without any example there is nobody who can help you. :(

  7. webwitch
    Member
    Posted 3 years ago #

    I used the 3 column template code in alchymyth's post above ie.

    http://wordpress.pastebin.com/29EuE02v

    It works in every other browser except IE6 - I have checked in browser shots. IE6 is still used a lot in the UK especially in government etc so it's a real problem.

  8. baszer
    Member
    Posted 3 years ago #

    can you give me the url of your website?

  9. webwitch
    Member
    Posted 3 years ago #

    It's here.
    Thanks for your help.

  10. baszer
    Member
    Posted 3 years ago #

    hi,

    there are several things going wrong. First you have some errors in your css.

    But the main thing why its not working, you put the div of the left sidebar after your main content. You should put the div of the left sidebar before the content

  11. webwitch
    Member
    Posted 3 years ago #

    Hi baszer, I have moved the left sidebar div above the content but it still doesn't work.

    I used the coding from the example and I noticed that the site using it also doesn't render properly in IE6 as below.

    http://www.transformationpowertools.com/wordpress/tips

    I have added a left sidebar to another theme in the past but it was not as complex as TwentyTen. The template css for the three column is a little cryptic for me but I am learning!

    Any other hints to correct this?
    Thanks.

  12. baszer
    Member
    Posted 3 years ago #

    hi,

    plz but the div after this line

    <div id="container" class="threecolumn">

    now you have it before this line

  13. webwitch
    Member
    Posted 3 years ago #

    Have moved the div but still no luck.

  14. baszer
    Member
    Posted 3 years ago #

    hi,

    use this stylesheet (i modified your stylesheet to work with your adjustments)

  15. webwitch
    Member
    Posted 3 years ago #

    Thanks baszer. I will take a look a bit later and try it out! Will let you know outcome.

  16. webwitch
    Member
    Posted 3 years ago #

    Hi baszer. Have now used your stylesheet and the 3 column works great in IE6 which is wonderful.

    I noticed that in the two column layout that you disabled the content margins which made the content run to the right hand edge under the sidebar. I added a width element and that seems to have solved the problem there. What do you think? So now it looks like this below:

    #content
    {
    /*[disabled]margin:0 240px 0 15px;*/
    width:740px;

    So thank you very much for this. Much appreciated.

  17. baszer
    Member
    Posted 3 years ago #

    I only tried to make it work in ie6 and other browers with 3 collumns ;)

    didnt try to keep the 2 collumn layout.

    But if its works its fine :)

    Perhaps you should delete all the disabled css (i kept it so you would know what i changed)

    But great to hear that it is working!

  18. webwitch
    Member
    Posted 3 years ago #

    It's great - thank you!

    I will be mainly using 3 columns except for the home page and news etc which will retain the 2 column layout.

    It works great in IE6 which is fab!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags