content.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Template part for displaying posts.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Shoreditch
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <div class="hentry-wrapper">
  12. <?php if ( ! is_single() || ! shoreditch_has_post_thumbnail() ) : ?>
  13. <header class="entry-header" <?php shoreditch_background_image(); ?>>
  14. <div class="entry-header-wrapper">
  15. <?php
  16. shoreditch_entry_meta();
  17. if ( is_single() ) {
  18. the_title( '<h1 class="entry-title">', '</h1>' );
  19. } else {
  20. the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  21. }
  22. ?>
  23. </div><!-- .entry-header-wrapper -->
  24. </header><!-- .entry-header -->
  25. <?php endif; ?>
  26. <div class="entry-content">
  27. <?php
  28. the_content( sprintf(
  29. /* translators: %s: Name of current post. */
  30. wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'shoreditch' ), array( 'span' => array( 'class' => array() ) ) ),
  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">' . esc_html__( 'Pages:', 'shoreditch' ) . '</span>',
  35. 'after' => '</div>',
  36. 'link_before' => '<span>',
  37. 'link_after' => '</span>',
  38. 'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'shoreditch' ) . ' </span>%',
  39. 'separator' => '<span class="screen-reader-text">, </span>',
  40. ) );
  41. ?>
  42. </div><!-- .entry-content -->
  43. <footer class="entry-footer">
  44. <?php shoreditch_entry_footer(); ?>
  45. </footer><!-- .entry-footer -->
  46. <?php shoreditch_author_bio(); ?>
  47. </div><!-- .hentry-wrapper -->
  48. </article><!-- #post-## -->