content-search.php 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * The template part for displaying results in search pages.
  4. *
  5. * Learn more: http://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( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
  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( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
  24. </footer><!-- .entry-footer -->
  25. <?php else : ?>
  26. <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
  27. <?php endif; ?>
  28. </article><!-- #post-## -->