/ Published in: PHP
taken from wordpress-- it took me a whole to find this on their site
Expand |
Embed | Plain Text
// place inside loop 'post_type' => 'attachment', 'numberposts' => null, 'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { the_attachment_link($attachment->ID, false); } }
You need to login to post a comment.
