Return to Snippet

Revision: 5487
at March 12, 2008 00:14 by melvitax

Initial Code
// place inside loop
$args = array(
	'post_type' => 'attachment',
	'numberposts' => null,
	'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);
		the_attachment_link($attachment->ID, false);

Initial URL

Initial Description
taken from wordpress-- it took me a whole to find this on their site

Initial Title
Show WordPress Post Attachments

Initial Tags

Initial Language