content-search.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * The template part for displaying results in search pages
  4. *
  5. * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Fifteen
  9. * @since Twenty Fifteen 1.0
  10. */
  11. ?>
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <?php twentyfifteen_post_thumbnail(); ?>
  14. <header class="entry-header">
  15. <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
  16. </header><!-- .entry-header -->
  17. <div class="entry-summary">
  18. <?php the_excerpt(); ?>
  19. </div><!-- .entry-summary -->
  20. <?php if ( 'post' == get_post_type() ) : ?>
  21. <footer class="entry-footer">
  22. <?php twentyfifteen_entry_meta(); ?>
  23. <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
  24. </footer><!-- .entry-footer -->
  25. <?php else : ?>
  26. <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
  27. <?php endif; ?>
  28. </article><!-- #post-## -->