[wp-testers] Post attachments?
Andy Skelton
skeltoac at gmail.com
Fri Dec 16 09:13:17 GMT 2005
On 12/15/05, Kyle Neath <kneath at gmail.com> wrote:
> Hey, I was playing around with theming 2.0 and I know one of the major
> advancements is the attachments... but how do I get to them? There doesn't
> seem to be a good helper method since attachments are saved under a
> different post ID than the actual post.
http://trac.wordpress.org/ticket/2087 has a diff to add
get_children(). Call it without arguments in the loop or pass it a
post object or an ID. It returns an ID-indexed array of post objects.
Pass it ARRAY_A or ARRAY_N to get an array of associative or
numerically indexed arrays.
Andy
More information about the wp-testers
mailing list