Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $args = array(
- 'post_type' => 'attachment',
- 'numberposts' => null,
- 'post_status' => null,
- 'post_parent' => $wp_query->queried_object->ID
- );
- $attachments = get_posts($args);
- if ($attachments) {
- foreach ($attachments as $attachment) {
- echo apply_filters('the_title', $attachment->post_title);
- the_attachment_link($attachment->ID, false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement