content-search.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * The template part for displaying results in search pages
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Sixteen
  7. * @since Twenty Sixteen 1.0
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <header class="entry-header">
  12. <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
  13. </header><!-- .entry-header -->
  14. <?php twentysixteen_post_thumbnail(); ?>
  15. <?php twentysixteen_excerpt(); ?>
  16. <?php if ( 'post' === get_post_type() ) : ?>
  17. <footer class="entry-footer">
  18. <?php twentysixteen_entry_meta(); ?>
  19. <?php
  20. edit_post_link(
  21. sprintf(
  22. /* translators: %s: Name of current post */
  23. __( 'Edit %s', 'twentysixteen' ),
  24. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  25. ),
  26. '<span class="edit-link">',
  27. '</span>'
  28. );
  29. ?>
  30. </footer><!-- .entry-footer -->
  31. <?php else : ?>
  32. <?php
  33. edit_post_link(
  34. sprintf(
  35. /* translators: %s: Name of current post */
  36. __( 'Edit %s', 'twentysixteen' ),
  37. the_title( '<span class="screen-reader-text">', '</span>', false )
  38. ),
  39. '<footer class="entry-footer"><span class="edit-link">',
  40. '</span></footer><!-- .entry-footer -->'
  41. );
  42. ?>
  43. <?php endif; ?>
  44. </article><!-- #post-## -->