content-gallery.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. /* translators: %s: Name of current post */
  39. the_content( sprintf(
  40. __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
  41. the_title( '<span class="screen-reader-text">', '</span>', false )
  42. ) );
  43. wp_link_pages( array(
  44. 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
  45. 'after' => '</div>',
  46. 'link_before' => '<span>',
  47. 'link_after' => '</span>',
  48. ) );
  49. ?>
  50. </div><!-- .entry-content -->
  51. <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
  52. </article><!-- #post-## -->