[wp-hackers] query_posts behaviour
Austin Matzko
if.website at gmail.com
Tue Jan 27 15:58:13 GMT 2009
On Tue, Jan 27, 2009 at 9:53 AM, Jon Mihkkal Inga
<lilla.molnet at gmail.com> wrote:
> I've noticed something about the the query_posts function. It doesn't do
> anything if I set 'post_type' to 'attachment'. I would expect it to setup
> all attachments so that they are available in the loop. Is this the intended
> behaviour?
You need to also specify "post_status" as "inherit". That's because
by default "post_status" is "publish," which does not apply to
attachments.
More information about the wp-hackers
mailing list