[wp-hackers] How can I filter on post count for categories?
Mike Schinkel
mikeschinkel at newclarity.net
Wed Jun 3 23:20:26 GMT 2009
Sounds like the "More Fields" plugin would give you exactly what you want. It uses the default post editor but add a menu option for each of your custom post types, in your case it would be "Tickets" and it would let you add custom fields specifically for posts of type "ticket" that would not show up on the normal post editor page.
HTH.
-Mike Schinkel
Custom Wordpress Plugins
http://mikeschinkel.com/custom-wordpress-plugins
----- Original Message -----
From: "L'Autre Monde" <autremonde75 at gmail.com>
To: wp-hackers at lists.automattic.com
Sent: Wednesday, June 3, 2009 6:32:31 PM GMT -05:00 US/Canada Eastern
Subject: Re: [wp-hackers] How can I filter on post count for categories?
Mike,
To be clear, I am currently developping a ticket system based on Wordpress.
So I created a custom type "ticket". I have customized the admin to include
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 scratch
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 with
the posts together on the front end. It works pretty well with some
filtering
on the wp_query however I am stuck on this category counter ;)
I will try the suggestion from Austin, thanks ;)
Cheers,
Olivier
----- 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?
> Olivier:
>
> 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
> http://mikeschinkel.com/custom-wordpress-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
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
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