Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul>
- <?php if (have_posts()) : while (have_posts()) : the_post();
- $args = array(
- 'post_type' => 'attachment',
- 'numberposts' => -1,
- 'post_status' => null,
- 'post_parent' => $post->ID
- );
- $attachments = get_posts($args);
- if ($attachments) {
- foreach ($attachments as $attachment) {
- print "\n";
- echo '<li>';
- the_attachment_link($attachment->ID, true);
- echo '<p>';
- echo apply_filters('the_title', $attachment->post_title);
- echo '</p></li>';
- }
- }
- endwhile; endif; ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement