[wp-hackers] Is there no get_post_attachments() function(ality)?
Michael Pretty
mpretty at voceconnect.com
Wed Sep 15 01:50:11 UTC 2010
This is probably your best bet.
get_children( array( 'post_parent' => $post_id, 'post_type' =>
'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') );
On 9/14/10 9:48 PM, Austin Matzko wrote:
> On Tue, Sep 14, 2010 at 8:42 PM, Mike Schinkel
> <mikeschinkel at newclarity.net> wrote:
>> I just had a need to load a list of attached photos for a post but try as I might I couldn't find a function to retrieve them, a function I would expect to be called something like get_post_attachments().
>>
>> I'm emailing to see if I overlooked something in core; did I miss a function to do what I was looking for?
> How about get_children()?
> _______________________________________________
> 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