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; }

Browse and Share

» Subscribe to Feed
» Leave a Comment

Related Posts:
» Widgets Admin Hack: Displaying 1 Sidebar at a Time
» Theme Update: iPin Pro v1.8
» How to Show Only Parent Category in a Post

» Newer Post:
« Previous Post: