[wp-hackers] Custom Post Type
Austin Matzko
if.website at gmail.com
Sun Jan 27 22:21:33 GMT 2008
On Jan 27, 2008 4:51 PM, Dan Larkin <nitephire at gmail.com> wrote:
> I do not want these special pages to show up under Manage Pages or Manage
Posts. I do want them to show up when one navigates to the pages'
permalinks.
[snip]
> Again, correct me if I'm wrong, but it
> seems like using set_query_var() will return only those posts which are of
> the special value when used in a separate query. This isn't what I want to
> do at all. I want the main query that handles usual post and page display
> to simply get a little extra code functionality to display posts with other
> 'post_type' values.
So you want posts of both post_type "post" and post_type "group" to be
included together? Then I would use the 'posts_where' filter to call
back a function where a regular expression replaces post_type = 'post'
with (post_type = 'post' OR post_type = 'group').
To keep the admin area from being affected, just test with
"is_admin()" before applying the filter.
More information about the wp-hackers
mailing list