content-search.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Template part for displaying results in search pages.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Toujours
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <?php if ( has_post_thumbnail() ) { ?>
  12. <div class="featured-image">
  13. <span>
  14. <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'toujours-featured' ); ?></a>
  15. </span>
  16. </div>
  17. <?php } ?>
  18. <header class="entry-header">
  19. <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
  20. <?php if ( 'post' === get_post_type() ) : ?>
  21. <div class="entry-meta">
  22. <?php
  23. toujours_posted_on();
  24. toujours_comment_link();
  25. ?>
  26. </div><!-- .entry-meta -->
  27. <?php endif; ?>
  28. </header><!-- .entry-header -->
  29. <div class="entry-content">
  30. <?php the_excerpt(); ?>
  31. </div><!-- .entry-content -->
  32. <footer class="entry-footer">
  33. <?php toujours_entry_footer(); ?>
  34. </footer><!-- .entry-footer -->
  35. </article><!-- #post-## -->