Thread: PHP question
View Single Post
Old 07-01-2013, 09:46 PM  
vdbucks
Monger Cash
 
Industry Role:
Join Date: Jul 2010
Posts: 2,773
Quote:
Originally Posted by BCyber View Post
Ya I know how to do all that but this is different. It's part of a function and I need to get all of the featured images from the media library. Displaying them individually isn't a problem.
See my post above... noting specifically the "'meta_key' => '_thumbnail_id'" in the query args...

If, however, you want to discard all other post data except for the featured image info, then you'll have to do a more advanced query with wpdb, join some tables and such... I could give you an example if this is what you want to do, but to be honest, the savings in overhead won't be that great compared to just running a normal query like I gave you above.
vdbucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote