content.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Template part for displaying posts
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package Seedlet
  8. * @since 1.0.0
  9. */
  10. ?>
  11. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  12. <header class="entry-header default-max-width">
  13. <?php
  14. if ( is_sticky() && is_home() && ! is_paged() ) {
  15. printf( '<span class="sticky-post">%s</span>', _x( 'Featured', 'post', 'seedlet' ) );
  16. }
  17. if ( is_singular() ) :
  18. the_title( '<h1 class="entry-title">', '</h1>' );
  19. else :
  20. the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
  21. endif;
  22. ?>
  23. </header><!-- .entry-header -->
  24. <?php seedlet_post_thumbnail(); ?>
  25. <div class="entry-content">
  26. <?php
  27. the_content(
  28. sprintf(
  29. wp_kses(
  30. /* translators: %s: Name of current post. Only visible to screen readers */
  31. __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'seedlet' ),
  32. array(
  33. 'span' => array(
  34. 'class' => array(),
  35. ),
  36. )
  37. ),
  38. get_the_title()
  39. )
  40. );
  41. wp_link_pages(
  42. array(
  43. 'before' => '<div class="page-links">' . __( 'Pages:', 'seedlet' ),
  44. 'after' => '</div>',
  45. )
  46. );
  47. ?>
  48. </div><!-- .entry-content -->
  49. <footer class="entry-footer default-max-width">
  50. <?php seedlet_entry_meta_footer(); ?>
  51. </footer><!-- .entry-footer -->
  52. </article><!-- #post-${ID} -->