Blogroll split into 2 columns?
-
Hi All,
I am wondering if there is a way to split links into 2 columns? I have done this with categories before, with the code below, but can’t adapt it to work with blogroll links.
<?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/2): $cat_left = $cat_left.'<li>'.$cats[$i].'</li>'; elseif ($i>=$cat_n/2): $cat_right = $cat_right.'<li>'.$cats[$i].'</li>'; endif; endfor; ?> <ul class="left"> <?php echo $cat_left;?> </ul> <ul class="right"> <?php echo $cat_right;?> </ul>
Any advice would be appreciated?
Thank you!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Blogroll split into 2 columns?’ is closed to new replies.