[wp-hackers] How can I filter on post count for categories?

Austin Matzko if.website at gmail.com
Wed Jun 3 17:21:05 GMT 2009


On Wed, Jun 3, 2009 at 12:16 PM, L'Autre Monde <autremonde75 at gmail.com> wrote:
> I am currently writing a plugin which creates a custom post type. When the category list widget is displayed, the number of posts per categories only includes the posts with a post type of "post". Also, if a category only has the customer post type, it isn't listed as it is seen as an empty one.
>
> I have tried to filter on the get_category and list_cats to modify the category->count for the category but it doesn't work :(

Try counting the number of items in the array returned by get_objects_in_term()


More information about the wp-hackers mailing list