content.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Template part for displaying posts
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package photos
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <header class="entry-header">
  12. <?php
  13. if ( is_singular() ) :
  14. the_title( '<h1 class="entry-title">', '</h1>' );
  15. else :
  16. the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  17. endif;
  18. ?>
  19. </header><!-- .entry-header -->
  20. <?php photos_post_thumbnail(); ?>
  21. <div class="entry-content">
  22. <?php
  23. the_content( sprintf(
  24. wp_kses(
  25. /* translators: %s: Name of current post. Only visible to screen readers */
  26. __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'photos' ),
  27. array(
  28. 'span' => array(
  29. 'class' => array(),
  30. ),
  31. )
  32. ),
  33. get_the_title()
  34. ) );
  35. wp_link_pages( array(
  36. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'photos' ),
  37. 'after' => '</div>',
  38. 'link_before' => '<span class="page-number">',
  39. 'link_after' => '</span>',
  40. ) );
  41. ?>
  42. </div><!-- .entry-content -->
  43. <footer class="entry-footer">
  44. <?php photos_posted_on(); ?>
  45. <?php photos_entry_footer(); ?>
  46. <?php photos_posted_by(); ?>
  47. <?php photos_editor_link(); ?>
  48. </footer><!-- .entry-footer -->
  49. </article><!-- #post-<?php the_ID(); ?> -->