X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..58f607a1de715c9bca69340a4d6fb9e1b9c2bed2:/wp-content/themes/twentyten/loop.php diff --git a/wp-content/themes/twentyten/loop.php b/wp-content/themes/twentyten/loop.php index 84c167dc..c0d746f3 100644 --- a/wp-content/themes/twentyten/loop.php +++ b/wp-content/themes/twentyten/loop.php @@ -68,22 +68,23 @@
- - -

%2$s photos.', 'twentyten' ), - 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', - $total_images - ); ?>

- - + + $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); + if ( $images ) : + $total_images = count( $images ); + $image = array_shift( $images ); + $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); + ?> + +

%2$s photos.', 'twentyten' ), + 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', + $total_images + ); ?>

+ +