content-recent-posts.php 874 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Template part for displaying Recent Posts in the front page template
  4. *
  5. * @package Karuna
  6. */
  7. ?>
  8. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  9. <header class="entry-header">
  10. <?php
  11. the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  12. if ( 'post' === get_post_type() ) : ?>
  13. <?php get_template_part( 'components/post/content', 'meta' ); ?>
  14. <?php
  15. endif; ?>
  16. </header>
  17. <div class="entry-summary">
  18. <?php the_excerpt(); ?>
  19. </div>
  20. <footer class="entry-footer">
  21. <?php
  22. edit_post_link(
  23. sprintf(
  24. /* translators: %s: Name of current post */
  25. esc_html__( 'Edit %s', 'karuna' ),
  26. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  27. ),
  28. '<span class="edit-link">',
  29. '</span>'
  30. );
  31. ?>
  32. </footer>
  33. </article><!-- #post-## -->