Advertisement
Guest User

Untitled

a guest
Feb 15th, 2012
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?php query_posts(''); ?>
  2. <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
  3.  
  4. $args = array(
  5. 'post_type' => 'attachment',
  6. 'numberposts' => -1,
  7. 'post_status' => null,
  8. 'post_parent' => $post->ID,
  9. 'orderby' => 'menu_order'
  10. );
  11.  
  12. $original = get_posts( $args );
  13. if ( $original ) {
  14. $attachments = array_reverse($original);
  15. foreach ( $attachments as $attachment ) {
  16. echo '<li><p>';
  17. echo wp_get_attachment_image( $attachment->ID, array(746,500) );
  18. echo '</p></li>';
  19. }
  20. }
  21.  
  22. endwhile; endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement