/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?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(); } } ?>