Hiding Sub-Categories in Wordpress

Prior to Wordpress 2.1, the wp_list_cats() function has a “children” parameter to hide your subcategories. For whatever reason, wp_list_cats() was deprecated, and the “children” parameter was dropped from the new wp_list_categories() function in WP2.1 and onwards.

So how to hide the unsightly subcategories from showing up in your sidebar? You can install and use the new function in the unfold_list_categories plugin by Braydon Fuller.

Or hide it with a quick and dirty trick using CSS. Simply open your style.css file and add the following code. And poof it’s gone :)

.children { display:none; }


What's Next?

» Share This (Social Bookmarks/Email)
» Subscribe to Feed
» Subscribe to Email
» Leave a Comment

Related Posts:
» Theme Bugfix: Artificial Intelligence
» Migrating Your Wordpress 2.0 themes over to Wordpress 2.1
» WP Plugin: Genki Pre-Publish Reminder

» Newer Post: How to Improve Search Function in WP [Using Plugins]
« Previous Post: Migrating Your Wordpress 2.2 themes to Wordpress 2.3