Advertisement
Guest User

Untitled

a guest
Jan 24th, 2012
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <?php while ( have_posts() ) : the_post(); ?>
  2.  
  3.                     <?php
  4.                     $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
  5.                     if ( $images ) {
  6.                     $total_images = count( $images );
  7.                         $image = array_shift( $images );
  8.                         echo $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
  9.                         }
  10.                    
  11.                         the_title();
  12.                         the_content();
  13.  
  14.                          ?>
  15.                         <?php comments_number( 'no responses', 'one response', '% responses' ); ?>.
  16.  
  17.                      
  18.  
  19.                 <?php endwhile; // end of the loop. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement