| 71 | | <?php else : ?> |
| 72 | | <div class="gallery-thumb"> |
| 73 | | <?php |
| 74 | | $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); |
| 75 | | $total_images = count( $images ); |
| 76 | | $image = array_shift( $images ); |
| 77 | | $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); |
| 78 | | ?> |
| 79 | | <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> |
| 80 | | </div><!-- .gallery-thumb --> |
| 81 | | <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), |
| 82 | | 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', |
| 83 | | $total_images |
| 84 | | ); ?></em></p> |
| 85 | | |
| 86 | | <?php the_excerpt( '' ); ?> |
| | 71 | <?php else : ?> |
| | 72 | <?php |
| | 73 | $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); |
| | 74 | if ( $images ) : |
| | 75 | $total_images = count( $images ); |
| | 76 | $image = array_shift( $images ); |
| | 77 | $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); |
| | 78 | ?> |
| | 79 | <div class="gallery-thumb"> |
| | 80 | <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> |
| | 81 | </div><!-- .gallery-thumb --> |
| | 82 | <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), |
| | 83 | 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', |
| | 84 | $total_images |
| | 85 | ); ?></em></p> |
| | 86 | <?php endif; ?> |
| | 87 | <?php the_excerpt( '' ); ?> |