0

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?

0

This may help...

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

  • The article was helpful in finding the information. – Robert Altman Jul 27 '11 at 15:38
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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