That will work for the interum. Maybe we should create some kind of helper method though?

Something like: $attachments = get_post_attachments($post->ID) with a corrresponding post_attachments() function?

Just throwing out ideas...  Also, I wonder if it would be possible to somehow get the URL of the attachment, and not just the file location.  Something so you could easily add attachments, and put them on the single template in the sidebar, for example.

-Kyle

On 12/16/05, Andy Skelton <[EMAIL PROTECTED]> wrote:
On 12/15/05, Kyle Neath <[EMAIL PROTECTED]> 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
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers



--
Kyle Neath
[EMAIL PROTECTED]
http://warpspire.com
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers

Reply via email to