[wp-testers] Post attachments?

Kyle Neath kneath at gmail.com
Fri Dec 16 16:10:16 GMT 2005


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 <skeltoac at gmail.com> wrote:
>
> 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
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>



--
Kyle Neath
kneath at gmail.com
http://warpspire.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-testers/attachments/20051216/a0c13a43/attachment.htm


More information about the wp-testers mailing list