Category Hierarchy
I have a personal WordPress blog where there are some sub categories under top categories. Its theme is non widgetized, and the sidebar function to display categories is “wp_list_categories(show_count=1&hierarchical=0).”
By default, WordPress displays all categories at one level regardless their hierarchy. Fortunately, I found out a simple modification would fix the way to display categories in regard to hierarchy.
Change the value of the argument ‘hierarchical’ to ‘1′ from ‘0′.
Before:
wp_list_categories(hierarchical=0)
After
wp_list_categories(hierarchical=1)
Category Order
I also have another blog where I want to control over category display order. The default display of categories in WordPress is by their alphabetical order. You can re-order categories by installing WordPress Category Order Plug-in.
Upzip the downloaded file, upload it to the root plug-in directory, activate the plugin via WordPress admin interface, and then change category orders by clicking ‘Manage’ -> ‘Order Categories’.
Make sure you don’t use ‘orderby=count’ in the sidebar function ‘wp_list_categories()’.
By Linda Camurato, January 17, 2010 @ 3:44 pm
Thank you so much for this article. It worked and it was very easy to follow your instructions!