        <article>
          <div id="post-<?php the_ID(); ?>" <?php post_class('article'); ?>>

            <header class="entry-header">
              <hgroup>
                <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s','kippis'), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
                <h3 class="entry-format"><?php _e( 'Gallery', 'kippis' ); ?></h3>
              </hgroup>
              <div class="entry-meta">
                <?php kippis_posted_on(); ?>
              </div><!-- .entry-meta -->
            </header><!-- .entry-header -->

            <?php
            if (is_search()) {  // Only display Excerpts for search pages
              echo '<div class="entry-summary">';
              the_excerpt();
              echo '</div>';
            }
            else {
              echo '<div class="entry-content">';
              if (post_password_required()) {
                the_content(__('Continue reading <span class="meta-nav">&rarr;</span>','kippis'));
              }
              else {
                $images = get_children(array('post_parent'    => $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');
                  echo '<figure class="gallery-thumb">'
                     . '<a href="' . get_permalink() . '">' . $image_img_tag . '</a>'
                     . '</figure>';
                  echo '<p><em>';
                  printf(_n('This gallery contains <a %1$s>%2$s photo</a>.','This gallery contains <a %1$s>%2$s photos</a>.',$total_images,'kippis')
                           ,'href="' . esc_url(get_permalink()) . '" title="' . sprintf(esc_attr__('Permalink to %s','kippis'),the_title_attribute('echo=0')) . '" rel="bookmark"',number_format_i18n($total_images));
                  echo '</em></p>';
                }
                the_excerpt();
              }
              wp_link_pages(array('before' => '<div class="page-link"><span>' . __('Pages:','kippis' ) . '</span>','after' => '</div>'));
              echo '</div>';
            }
            echo '<footer class="entry-meta">';
              $show_sep = false;
              $categories_list = get_the_category_list(__(', ','kippis'));  // translators: used between list items, there is a space after the comma
              if ($categories_list) {
                echo '<span class="cat-links">';
                printf(__('<span class="%1$s">Posted in</span> %2$s','kippis'),'entry-utility-prep entry-utility-prep-cat-links',$categories_list);
                $show_sep = true;
                echo '</span>';
              }
              $tags_list = get_the_tag_list('', __(', ','kippis'));  // translators: used between list items, there is a space after the comma
              if ($tags_list) {
                if ($show_sep) {
                  echo '<span class="sep"> | </span>';
                }
                echo '<span class="tag-links">';
                printf( __( '<span class="%1$s">Tagged</span> %2$s', 'kippis' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
                $show_sep = true;
                echo '</span>';
              }
              if (comments_open()) {
                if ($show_sep) {
                  echo '<span class="sep"> | </span>';
                }
                echo '<span class="comments-link">';
                comments_popup_link('<span class="leave-reply">'.__('Leave a reply','kippis') . '</span>',__('<b>1</b> Reply','kippis'), __('<b>%</b> Replies','kippis'));
                echo '</span>';
              }
              edit_post_link(__('Edit','kippis'),'<span class="edit-link">','</span>');
            echo '</footer>';
          ?>

          </div><!-- article - #post-<?php the_ID(); ?> -->
        </article>

