content.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * The default template for displaying content
  4. *
  5. * Used for both single and index/archive/search.
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Fifteen
  9. * @since Twenty Fifteen 1.0
  10. */
  11. ?>
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <?php
  14. // Post thumbnail.
  15. twentyfifteen_post_thumbnail();
  16. ?>
  17. <header class="entry-header">
  18. <?php
  19. if ( is_single() ) :
  20. the_title( '<h1 class="entry-title">', '</h1>' );
  21. else :
  22. the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
  23. endif;
  24. ?>
  25. </header><!-- .entry-header -->
  26. <div class="entry-content">
  27. <?php
  28. /* translators: %s: Name of current post */
  29. the_content( sprintf(
  30. __( 'Continue reading %s', 'twentyfifteen' ),
  31. the_title( '<span class="screen-reader-text">', '</span>', false )
  32. ) );
  33. wp_link_pages( array(
  34. 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
  35. 'after' => '</div>',
  36. 'link_before' => '<span>',
  37. 'link_after' => '</span>',
  38. 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
  39. 'separator' => '<span class="screen-reader-text">, </span>',
  40. ) );
  41. ?>
  42. </div><!-- .entry-content -->
  43. <?php
  44. // Author bio.
  45. if ( is_single() && get_the_author_meta( 'description' ) ) :
  46. get_template_part( 'author-bio' );
  47. endif;
  48. ?>
  49. <footer class="entry-footer">
  50. <?php twentyfifteen_entry_meta(); ?>
  51. <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
  52. </footer><!-- .entry-footer -->
  53. </article><!-- #post-## -->