content-search.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 Button 2
  8. */
  9. $format = get_post_format();
  10. ?>
  11. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  12. <header class="entry-header">
  13. <?php if ( has_post_thumbnail() ) : ?>
  14. <div class="featured-image">
  15. <span class="corners">
  16. <?php the_post_thumbnail( 'button-2-featured' ); ?>
  17. </span>
  18. <a class="shadow" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><span class="screen-reader-text"><?php the_title(); ?></span></a>
  19. </div>
  20. <?php endif; ?>
  21. <?php if ( 'post' == get_post_type() ) : ?>
  22. <?php button_2_entry_cats(); ?>
  23. <?php endif; ?>
  24. <?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
  25. <?php if ( 'post' == get_post_type() ) : ?>
  26. <div class="entry-meta">
  27. <?php button_2_posted_on(); ?>
  28. </div>
  29. <?php endif; ?>
  30. </header><!-- .entry-header -->
  31. <div class="entry-summary">
  32. <?php the_excerpt(); ?>
  33. </div><!-- .entry-summary -->
  34. <?php if ( function_exists( 'button_2_post_flair' ) ) : ?>
  35. <div class="entry-flair">
  36. <?php button_2_post_flair(); ?>
  37. </div><!-- .entry-flair -->
  38. <?php endif; ?>
  39. </article><!-- #post-## -->