content-gallery.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * The template for displaying posts in the Gallery post format
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Fourteen
  7. * @since Twenty Fourteen 1.0
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <?php twentyfourteen_post_thumbnail(); ?>
  12. <header class="entry-header">
  13. <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
  14. <div class="entry-meta">
  15. <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
  16. </div><!-- .entry-meta -->
  17. <?php
  18. endif;
  19. if ( is_single() ) :
  20. the_title( '<h1 class="entry-title">', '</h1>' );
  21. else :
  22. the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  23. endif;
  24. ?>
  25. <div class="entry-meta">
  26. <span class="post-format">
  27. <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>"><?php echo get_post_format_string( 'gallery' ); ?></a>
  28. </span>
  29. <?php twentyfourteen_posted_on(); ?>
  30. <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
  31. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
  32. <?php endif; ?>
  33. <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
  34. </div><!-- .entry-meta -->
  35. </header><!-- .entry-header -->
  36. <div class="entry-content">
  37. <?php
  38. the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
  39. wp_link_pages( array(
  40. 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
  41. 'after' => '</div>',
  42. 'link_before' => '<span>',
  43. 'link_after' => '</span>',
  44. ) );
  45. ?>
  46. </div><!-- .entry-content -->
  47. <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
  48. </article><!-- #post-## -->