content.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 twentyfifteen_post_thumbnail(); ?>
  14. <header class="entry-header">
  15. <?php
  16. if ( is_single() ) :
  17. the_title( '<h1 class="entry-title">', '</h1>' );
  18. else :
  19. the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' );
  20. endif;
  21. ?>
  22. </header><!-- .entry-header -->
  23. <div class="entry-content">
  24. <?php
  25. /* translators: %s: Name of current post */
  26. the_content( sprintf(
  27. esc_html__( 'Continue reading %s', 'twentyfifteen' ),
  28. the_title( '<span class="screen-reader-text">', '</span>', false )
  29. ) );
  30. wp_link_pages( array(
  31. 'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'twentyfifteen' ) . '</span>',
  32. 'after' => '</div>',
  33. 'link_before' => '<span>',
  34. 'link_after' => '</span>',
  35. ) );
  36. ?>
  37. </div><!-- .entry-content -->
  38. <?php
  39. if ( is_single() && get_the_author_meta( 'description' ) ) :
  40. get_template_part( 'author-bio' );
  41. endif;
  42. ?>
  43. <footer class="entry-footer">
  44. <?php twentyfifteen_entry_meta(); ?>
  45. <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
  46. </footer><!-- .entry-footer -->
  47. </article><!-- #post-## -->