content.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Template part for displaying posts.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Lodestar
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <?php if ( has_post_thumbnail() && ! is_single() ) : ?>
  12. <div class="post-thumbnail">
  13. <a href="<?php the_permalink(); ?>">
  14. <?php the_post_thumbnail( 'lodestar-featured-archive-image' ); ?>
  15. </a>
  16. </div>
  17. <?php endif; ?>
  18. <header class="entry-header">
  19. <?php
  20. if ( is_single() ) {
  21. the_title( '<h1 class="entry-title">', '</h1>' );
  22. } else {
  23. the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  24. }
  25. if ( 'post' === get_post_type() ) : ?>
  26. <div class="entry-meta">
  27. <?php lodestar_posted_on(); ?>
  28. </div><!-- .entry-meta -->
  29. <?php endif;
  30. ?>
  31. </header>
  32. <div class="entry-content">
  33. <?php
  34. the_content( sprintf(
  35. /* translators: %s: Name of current post. */
  36. wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'lodestar' ), array( 'span' => array( 'class' => array() ) ) ),
  37. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  38. ) );
  39. wp_link_pages( array(
  40. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'lodestar' ),
  41. 'after' => '</div>',
  42. 'link_before' => '<span>',
  43. 'link_after' => '</span>'
  44. ) );
  45. ?>
  46. </div>
  47. <footer class="entry-footer">
  48. <?php lodestar_entry_footer(); ?>
  49. </footer><!-- .entry-footer -->
  50. <?php lodestar_author_bio(); ?>
  51. </article><!-- #post-## -->