How To Order WordPress Categories

Setting up a blog or a website using wordpress is pretty easy.  Often we end up with some problems when we try to customize the wordpress site. One such common problem which I faced, as do by many is that, after creating a list of categories and wanted to display the categories in the order I prefer. But the default “order” you can use is “ASC” or “DESC” and “order by” are ID, name, slug, count, term_group. Which doesn’t work for me?

Then I found a great plugin “My Category Order”. This made my life easy and solved the issue with arranging the categories in the preferred way. This plugin allows you to arrange your categories to your preference by dragging each category item. Then, you will have to change the code, based on how you display the categories, and then you will be ready to go.

How To Arrange wordpress categories:

After you have installed and activated the plugin, you should have a new menu item “my category order”  in the admin console.

Navigate to the menu item and then you simply arrange the categories in the order you want by dragging and dropping them within the WordPress admin console as you see in the photo below:

Next, If your theme is using the “categories” widget, then you can replace that with “My Category Order” widget.

If your theme is using a custom code to display the categories using “wp_list_categories”, then change the code to

<?php wp_list_categories(’orderby=order’) ?>

The main change to do for the categories  is “orderby=order” which tells WordPress to display your categories in the order that you have selected using My Category Order plugin.

Display of default category:                                                                                              Display of categories after arranging:

In short, when the default category setup does not meet your needs  download the My Category Order WordPress Plugin, arrange your categories, and then modify the PHP code  to reflect your new WordPress Category order. Other than “My category order” plugin there are other useful plugins. Here is the list of top 10 useful plugins which are very much useful in building a effective wordpress site.

Leave a Reply