content-excerpt.php 922 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Template part for displaying post archives and search results
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package WordPress
  8. * @subpackage Varia
  9. * @since 1.0.0
  10. */
  11. ?>
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <header class="entry-header responsive-max-width">
  14. <?php
  15. if ( is_sticky() && is_home() && ! is_paged() ) {
  16. printf( '<span class="sticky-post">%s</span>', _x( 'Featured', 'post', 'varia' ) );
  17. }
  18. the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
  19. ?>
  20. </header><!-- .entry-header -->
  21. <?php varia_post_thumbnail(); ?>
  22. <div class="entry-content">
  23. <?php the_excerpt(); ?>
  24. </div><!-- .entry-content -->
  25. <footer class="entry-footer responsive-max-width">
  26. <?php varia_entry_footer(); ?>
  27. </footer><!-- .entry-footer -->
  28. </article><!-- #post-${ID} -->