[wp-hackers] Query to return only posts that have an image attachment
adamholz at gmail.com
Fri Jan 22 05:01:12 UTC 2010
Thanks for your response Dave. I understand the difference between
attaching an image to a post and inserting but appreciate you pointing out
the potential additional complexity. Actually, if you add something to
Media Library and then insert in a post later, it will be an attachment.
In any case, the scenario I'm working with is very specific and each post
can contain a gallery of attachments. I just need to be able to query only
the posts that have an attachment with an image post_mime_type. Still hoping
that someone out there has some guidance on a better way than one of my
kludges to accomplish that. Thanks.
More information about the wp-hackers