[wp-hackers] how to query all posts from post type and some posts from another post type?

Steve Taylor steve at sltaylor.co.uk
Mon May 7 14:23:02 UTC 2012

My suspicion is this won't be possible with a single WP_Query. You may
have to do two, concatenate the resulting arrays, and maybe re-sort
using something like usort().

On 7 May 2012 11:53, Konrad Karpieszuk <kkarpieszuk at gmail.com> wrote:
> hello
> I have to query posts (jn main loop) from two post types:
> - 'post' (regular post type from wordpress) but only those, which have
> 'fdp' category
> - 'fdp-post' (post type created by me) with any category
> and i really dont know how to do this :) both conditions should
> produce on list of posts arranged by date
> --
> (en) regards / (pl) pozdrawiam
> Konrad Karpieszuk
> http://tradematik.pl wtyczka do WordPressa do tworzenia sklepów dla
> klientów z Polski
> _______________________________________________
> 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