content.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * The template part for displaying content
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Sixteen
  7. * @since Twenty Sixteen 1.0
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <header class="entry-header">
  12. <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
  13. <span class="sticky-post"><?php _e( 'Featured', 'twentysixteen' ); ?></span>
  14. <?php endif; ?>
  15. <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
  16. </header><!-- .entry-header -->
  17. <?php twentysixteen_excerpt(); ?>
  18. <?php twentysixteen_post_thumbnail(); ?>
  19. <div class="entry-content">
  20. <?php
  21. /* translators: %s: Name of current post */
  22. the_content( sprintf(
  23. __( 'Continue reading %s', 'twentysixteen' ),
  24. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  25. ) );
  26. wp_link_pages( array(
  27. 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
  28. 'after' => '</div>',
  29. 'link_before' => '<span>',
  30. 'link_after' => '</span>',
  31. 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
  32. 'separator' => '<span class="screen-reader-text">, </span>',
  33. ) );
  34. ?>
  35. </div><!-- .entry-content -->
  36. <footer class="entry-footer">
  37. <?php twentysixteen_entry_meta(); ?>
  38. <?php
  39. edit_post_link(
  40. sprintf(
  41. /* translators: %s: Name of current post */
  42. __( 'Edit %s', 'twentysixteen' ),
  43. the_title( '<span class="screen-reader-text">', '</span>', false )
  44. ),
  45. '<span class="edit-link">',
  46. '</span>'
  47. );
  48. ?>
  49. </footer><!-- .entry-footer -->
  50. </article><!-- #post-## -->