/ Published in: PHP
Expand |
Embed | Plain Text
'post_type' => 'attachment', 'numberposts' => null, 'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts( $args ); if ( $attachments ) { foreach ( $attachments as $attachment ) { $attachment_id = $post->ID ; // attachment ID $image_attributes = wp_get_attachment_image_src( $attachment_id ); echo '<li>'; //echo filesize( get_attached_file( $attachment->ID ) ); //echo wp_get_attachment_metadata( $attachment->ID, $unfiltered ); //echo wp_get_attachment_link('width'); //echo wp_get_attachment_link('height'); //echo '<p>'; //echo apply_filters( 'the_title', $attachment->post_title ); //echo '</p>'; echo '</li>'; } }
You need to login to post a comment.
