Categories in Sidebar Display
There a many reasons why you might not want all categories to display in the side bar. Some possible reasons are:
- Display some categories under 1 title and other categories under another title
- Some categories may serve a special purpose
- Some categories may meant to be hidden
The standard default category widget includes all categories and this cannot be changed. However, the WP-dTree plugin is available for all dVector accounts and allows a wide range of options including exclusion of certain categories. Also, those writing their own sidebar.php template have a huge number of options.
WP-dTree Plugin
This is an excellent plugin and I recommend its use for all those who wish more advanced display of categories for navigation purposes. It is not currently used on the Oracle of ONE1 blog as my needs are quite simple here but I do implement it on 90% of my client work.
Once activated, options for this plugin are available in the Presentation tab. From the options it is a simple matter to exclude any number of categories you wish. Just enter a comma separated list of category IDs. The ID numbers are found as the first column in the Manage > Categories tab (see comments).
Then just drag the WP-dTree widget into the sidebar as you would any other widget.
Custom Sidebar Template
Actual editing of the template sidebar.php provides the most customization power. If you choose this advanced approach, please read documentation provided on wordpress.org. Displaying all but one category may be accomplished with the following code:
<?php wp_list_categories('show_count=1&exclude=86&title_li=<h2>Categories</h2>'); ?>







July 16th, 2008 at 11:49 am
Where is the Category ID?
Recent WordPress versions no longer display the Category ID as mentioned in the article. Instead, you may find the ID by rolling-over the category name and viewing your browser’s status bar. I should show something similar to “… /categories.php?action=edit&cat_ID=6″.