WordPress.org

Support

Support » Themes and Templates » Split sidebar into columns?

Split sidebar into columns?

  • 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…

Viewing 6 replies - 1 through 6 (of 6 total)
  • John
    Member

    @jberghem

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

    http://wordpress.org/extend/themes/aspire
    http://wordpress.org/extend/themes/mini
    http://wordpress.org/extend/themes/xmark

    NB. Classes have to do with CSS not with PHP

    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.

    John
    Member

    @jberghem

    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.

    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

    John
    Member

    @jberghem

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

    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.

    http://phpmash.com/2008/02/14/formatting-the-wordpress-category-lists-html-using-wp_list_categories/

    ^^^^^^^^^^^
    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Split sidebar into columns?’ is closed to new replies.