RE: btdoyle
I’ve been using that code, but trying to break it up into 4 columns. Anything greater than 2 columns doesn’t work properly.
<?php
$cats = explode("<br />",wp_list_categories('title_li=&echo=0&depth=1&style=none'));
$cat_n = count($cats) - 1;
for ($i=0;$i<$cat_n;$i++):
if ($i<$cat_n/4):
$cat_one = $cat_one.'<li>'.$cats[$i].'</li>';
elseif ($i>=$cat_n/4 && $i<($cat_n/4)*2):
$cat_two = $cat_two.'<li>'.$cats[$i].'</li>';
elseif ($i>=($cat_n/4)*2 && $i<($cat_n/4)*3):
$cat_three = $cat_three.'<li>'.$cats[$i].'</li>';
elseif ($i>=($cat_n/4)*3):
$cat_four = $cat_four.'<li>'.$cats[$i].'</li>';
endif;
endfor;
?>
<ul class="clientsCol"><?php echo $cat_one;?></ul>
<ul class="clientsCol"><?php echo $cat_two;?></ul>
<ul class="clientsCol"><?php echo $cat_three;?></ul>
<ul class="clientsCol"><?php echo $cat_four;?></ul>
I’m looking for exactly the same thing except in 3 columns.