The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Split sidebar into columns? (7 posts)

  1. raisinlove
    Posted 7 years ago #

    Hello, I was just wondering how I could achieved this, if anyone else has done it or even if there's a plugin that might help: I would like to split my sidebar links into 2 columns instead of one long list.
    Anyone have any ideas? I have some PHP knowledge but mixing up the WordPress classes and functions starts to get confusing...

  2. John
    Posted 7 years ago #

    Just create a second sidebar. There are quite a few themes like that out there, like:


    NB. Classes have to do with CSS not with PHP

  3. raisinlove
    Posted 7 years ago #

    Thanks, that's not exactly what I meant, I was rather thinking of a way to automaticaly split the menu items into two or more arrays, one for each column.

    As for classes, they're not only used in CSS but in pretty much all programming and scripting languages, including PHP.

  4. John
    Posted 7 years ago #

    I stand corrected. There just too many people out there that get XHTML, PHP and CSS mixed up because they don't know what does what. Since the WordPress tags aren't really PHP (although they are driven by PHP) one usually doesn't get into the whole classes and functions level of PHP when designing themes or template files.

    You would have to do that with PHP probably with a hack (I'm not good with PHP). CSS3 will provide the possibility to create columns but I take it you don't want to wait till it's supported by all browsers. Who knows someday when Internet Explorer 15 is released it might support CSS3.

    Maybe you could try creating two list one with the odd post ID numbers and one with the even post ID numbers, although that might not give you the order you'd like.

  5. raisinlove
    Posted 7 years ago #

    On the PHP level of hacking, a WordPress plugin would be ideal, as I dont know how else this could be achieved without it breaking when upgrading WordPress. I like your idea about the odd and even IDs, I have no particular order in mind for my posts... hmmm

  6. John
    Posted 7 years ago #

    Just don't go deleting every other post or you'll still end up with one column. (lol)

  7. indestiny
    Posted 7 years ago #

    trying to find the solution for this aswell.

    I want to split it up into 2 columns only.

    I found this but i couldn't get it to go into 2 columns.


    First you get the split from that tutorial, then i need to split the split. Then column 1 div = $split/split1 and column 2 div = $split/split2

Topic Closed

This topic has been closed to new replies.

About this Topic