I have 15 categories. I list this using <div class="category_list"><ul><li><?php wp_list_categories();?></li></ul></div>
Now it's listing all 15 categories into a single div which is category_list.
I am trying to print these categories 5 by 5 in three divs. like:
<div class="category_list">first 5 categories here </div>
<div class="category_list">6th to 10th categories here </div>
<div class="category_list">11th to 15th categories here </div>
Those divs are float next to each other I can do that using CSS.
But how can I achieve that HTML markup using PHP coding?
Any help will be very much appreciated. Thanks in advance.
get_categories
. This should give you more flexibility