How to display all Categories in Multiple Columns in your WordPress site

Some time ago I want to display all categories (all the parent and child) of my site in the footer in the multiple columns. All the codes on the net were useless for me because some code display categories list in the definite row or some were showing in the hierarchy. Then I read the documentation on wordpress and found a very interesting function wp_list_categories that can be used for displaying or retrieve the html list of the categories.

You can extend its capabilities according to your requirement by passing some arguments.
Here I am describing you how you can show all categories without any hierarchy
You can pass ‘hierarchical=0’ or ‘hierarchical=1’, if you don’t want to show the categories in hierarchy then you can use ‘hierarchical=0’ otherwise use ‘hierarchical=1’.

<div id="footCatories"> 
 <?php wp_list_categories('hierarchical=0'); ?>

Or if you want to show categories order by their name then you can use :

<div id="footCatories"> 
 <?php wp_list_categories('orderby=name@hierarchical=0'); ?>

I have also create CSS for the list of the categories, you can use this:

#footCatories {
    height: auto !important;
    min-height: 100px;
    min-width: 1024px;
    overflow: hidden;
    padding: 10px 0;
    width: 100%;
#footCatories ul li {
     display: block;
    float: left;
    line-height: 16px;
    padding-right: 5px;
    width: 160px;
#footCatories ul {  
float: left;
    list-style: none outside none;
    margin: 0;
    padding: 0;
    width: 100%;
  • akasharora

    Thank You very much for sharing this really helpful code for showing categories in mulitple columns. well before watching you tutorial I was really confused how I can make such categories.