content-link.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * The template for displaying link post formats
  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( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
  18. else :
  19. the_title( sprintf( '<h2 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h2>' );
  20. endif;
  21. ?>
  22. </header>
  23. <!-- .entry-header -->
  24. <div class="entry-content">
  25. <?php
  26. /* translators: %s: Name of current post */
  27. the_content( sprintf(
  28. __( 'Continue reading %s', 'twentyfifteen' ),
  29. the_title( '<span class="screen-reader-text">', '</span>', false )
  30. ) );
  31. wp_link_pages( array(
  32. 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
  33. 'after' => '</div>',
  34. 'link_before' => '<span>',
  35. 'link_after' => '</span>',
  36. 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
  37. 'separator' => '<span class="screen-reader-text">, </span>',
  38. ) );
  39. ?>
  40. </div>
  41. <!-- .entry-content -->
  42. <?php
  43. // Author bio.
  44. if ( is_single() && get_the_author_meta( 'description' ) ) :
  45. get_template_part( 'author-bio' );
  46. endif;
  47. ?>
  48. <footer class="entry-footer">
  49. <?php twentyfifteen_entry_meta(); ?>
  50. <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
  51. </footer>
  52. <!-- .entry-footer -->
  53. </article><!-- #post-## -->