Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to exclude a category from my categories sidebar widget. If I understand the way this works, the sidebar.php code is not in use since the widget is displaying the categories. (something similar was discussed in this support topic: http://wordpress.org/support/topic/problem-trying-to-hide-a-category-in-the-sidebar ).

How can I modify the query used by the widget; or is there another means of excluding specific categories from inclusion in the category list?

share|improve this question
add comment

2 Answers 2

This may help...

http://www.kimwoodbridge.com/how-to-exclude-a-category-from-the-sidebar-list-in-wordpress/

share|improve this answer
    
The article was helpful in finding the information. –  Robert Altman Jul 27 '11 at 15:38
add comment
up vote 0 down vote accepted

I'll answer my own question so that the results are in the discussion thread.

All of the suggestions I've seen don't seem to work with the current version of WordPress (3.2). There are some widgets which will execute PHP script directly, used in conjunction with the correct query, this qualifies as a solution.

Plugins with PHP capability:

I used PHP Code Widget myself.

The query:

<?php wp_list_categories('show_count=1&exclude=12,24&title_li='); ?>

(or similar).

You still need to lookup the value of the category or categories to exclude; in this case, I excluded categories 12 and 24

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.