[wp-hackers] How can I filter on post count for categories?
Joost de Valk
joost at yoast.com
Wed Jun 3 22:33:57 GMT 2009
Arent you looking for custom taxonomies? :)
L'Autre Monde wrote:
> To be clear, I am currently developping a ticket system based on
> So I created a custom type "ticket". I have customized the admin to
> this new type and duplicated the post editor with some restrictions.
> The idea behind that is that I wanted to keep wordpress built-in
> features intact.
> I didn't want to tweak the post editor. So I added another menu from
> with the same functionnalities as the post editor with custom fields.
> Now that my admin I/F looks ok, I need to be able to bring the tickets
> the posts together on the front end. It works pretty well with some
> on the wp_query however I am stuck on this category counter ;)
> I will try the suggestion from Austin, thanks ;)
> ----- Original Message ----- From: "Mike Schinkel"
> <mikeschinkel at newclarity.net>
> To: <wp-hackers at lists.automattic.com>
> Sent: Wednesday, June 03, 2009 7:56 PM
> Subject: Re: [wp-hackers] How can I filter on post count for categories?
>> 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:
>>> 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? :)
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
*Joost de Valk*
SEO & Web Development (Magento & WordPress)
OrangeValley <http://www.orangevalley.nl> & Yoast <http://yoast.com>
E: joost at orangevalley.nl <mailto:joost at orangevalley.nl> -
joost at yoast.com <mailto:joost at yoast.com>
T: +31624555808 | @yoast <http://twitter.com/yoast> on Twitter
More information about the wp-hackers