Return to Snippet

Revision: 51241
at September 19, 2011 07:40 by davebowker


Initial Code
<?php
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => null ); 
$attachments = get_posts( $args );
if ($attachments) {
	foreach ( $attachments as $post ) {
		setup_postdata($post);
		the_title();
		the_attachment_link($post->ID, false);
		the_excerpt();
	}
}
?>

Initial URL

                                

Initial Description

                                

Initial Title
Get ALL attachments from wordpress

Initial Tags

                                

Initial Language
PHP