WordPress.org

Ready to get started?Download WordPress

Forums

two sidebar.php layout? (13 posts)

  1. ArmageddonDesign
    Member
    Posted 9 years ago #

    I'm building a hybrid blogsite and have installed 1.5. The client wants the classic 3 column layout with sidebars on either side of the content area.

    Is there any way to create a "sidebarright.php" and "sidebarleft.php" and include them using the PHP include commands like including the normal "sidebar.php"?

  2. XeroCool
    Member
    Posted 9 years ago #

    I guess so but wouldnt it better to put both sidebars in 1 file and use <div id="sidebaright"> and <div id="sidebarleft">?

  3. Root
    Member
    Posted 9 years ago #

    I see what you mean. This looks tricky.

  4. Jinsan
    Member
    Posted 9 years ago #

    I guess you could call them both by using TEMPLATEPATH - you woudl then have to apply a div to both individually sideleft/sideright. It will be quite messy I think but it could work, think someone with more php knowledge should be able to answer better, but I don't see why it won't work.

  5. iand
    Member
    Posted 9 years ago #

    On my site i use
    <?php include "sidebarleft.php"; ?> and <?php include "sidebarright.php"; ?> where the two php files reside in the themes directory.

  6. dawg
    Member
    Posted 9 years ago #

    Yeah it should work just fine, this was done a long time age and is three columns static

    http://southtexaswomensconsultants.cafe789.com/index.htm

    but I basically used this to design my current blog

    http://cafe789.com/stwc/index.htm two columns

    Actually a while ago I wanted to do a theme that was two in one that was either a two column or a three column design sharing ones common css file but two different index files.

  7. Root
    Member
    Posted 9 years ago #

    The thing is though dawg a lot of folks are going to want to keep the source order intact. And if you split the php output how do you unite it again for your 2 columns? I have one of these up and running but the hacking is horrible. Id like to find a more elegant solution.

  8. dawg
    Member
    Posted 9 years ago #

    For the three column which has been thrown on the backburner, I was going to use one sidebar with two divs left and right floated either side of content

  9. dawg
    Member
    Posted 9 years ago #


  10. ArmageddonDesign
    Member
    Posted 9 years ago #

    Awesome! I'll try the file include tags right now and see how it works. I'll post back to this thread to let everyone know how it works.

    Thanks!

  11. ArmageddonDesign
    Member
    Posted 9 years ago #

    "On my site i use
    <?php include "sidebarleft.php"; ?> and <?php include "sidebarright.php"; ?> where the two php files reside in the themes directory."

    Perfect! Perfect! Perfect! This worked perfectly! And it's a simple and elegant solution, to boot! Thanks a million!

    (I'll be posting a link to the site in the My WordPress forum when it's launched in roughly a week. :))

  12. residualforces
    Member
    Posted 9 years ago #

    Okay, then what. How do you use the two columns? When I changed that, it my old one is gone. If I'm using the WP1.5 default, do I need to creat 'sidebarleft.php' & sidebarleft.php' files? I am guessing so.

    The next question is, how do I adapt to using 2 columns from the wordpress controls? If I want the OE categories (archives, meta, etc) on one side, and my links and blogrolls on the other, how will I do that?

  13. Jinsan
    Member
    Posted 9 years ago #

    if you want to keep your existing one, just create a second one and modify that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.