This is all about Facts & Reviews

      have_posts()) : $recent->the_post();?>



 

// Grab the categories – top level only (depth=1)
$get_cats = wp_list_categories( ‘echo=0&title_li=&depth=1′ );
// Split into array items
$cat_array = explode(‘

‘,$get_cats);
// Amount of categories (count of items in array)
$results_total = count($cat_array);
// How many categories to show per list (round up total divided by 5)
$cats_per_list = ceil($results_total / 5);
// Counter number for tagging onto each list
$list_number = 1;
// Set the category result counter to zero
$result_number = 0;
?>

foreach($cat_array as $category) {
$result_number++;

if($result_number % $cats_per_list == 0) {
$list_number++;
echo $category.’

    ‘;

}

else {

echo $category.’

‘;

}

} ?>