Created
May 19, 2011 09:17
-
-
Save EdwardIII/980453 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID ); | |
$attachments = get_posts($args); | |
if ($attachments) { | |
foreach ( $attachments as $attachment ) { | |
echo apply_filters( 'the_title' , $attachment->post_title ); | |
echo apply_filters( 'the_content' , $attachment->post_excerpt); | |
the_attachment_link( $attachment->ID , false ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment