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

Mike Schinkel mikeschinkel at newclarity.net
Wed Jun 3 17:56:39 GMT 2009


While I haven't drilled down yet to do this I think custom post types  
could be a really important addition to WP either as a plugin or  
better yet to core. As there are so many assumptions in WordPress that  
assume "post" that doing as a plugin will be an uphill battle which is  
why it would really need to be in core.  If not in core too many other  
plugins won't support the notion of custom post types.

I have a plugin I'm using for custom URLs that would fits well with  
custom post types. It's not yet ready to be released because it  
doesn't yet have an admin console interface and also because it still  
has a lot of areas where it is not robust but I have been using it  
with the More Fields plugin which gives kind of a psuedo-custom post  
types capability.

Anyway, the reason I email is to ask why not use More Fields because  
it works albeit not using wp_posts->post_type but instead wp_postmeta- 
 >option_name="mf_post_type", and also to see how many other people  
are interested in a custom post types in core?

-Mike Schinkel
WordPress Custom Plugins

On Jun 3, 2009, at 1:16 PM, L'Autre Monde wrote:

> Hello,
> 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 :(
> Any idea for this please? :)
> Cheers!
> Olivier
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list