search.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * The template for displaying Search Results pages
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Fourteen
  7. * @since Twenty Fourteen 1.0
  8. */
  9. get_header(); ?>
  10. <div id="main-content" class="main-content inner-wrapper">
  11. <div id="primary" class="content-area">
  12. <div id="content" class="site-content" role="main">
  13. <?php if ( have_posts() ) : ?>
  14. <header class="page-header">
  15. <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
  16. </header><!-- .page-header -->
  17. <?php
  18. // Start the Loop.
  19. while ( have_posts() ) : the_post();
  20. /*
  21. * Include the post format-specific template for the content. If you want to
  22. * use this in a child theme, then include a file called called content-___.php
  23. * (where ___ is the post format) and that will be used instead.
  24. */
  25. get_template_part( 'content', get_post_format() );
  26. endwhile;
  27. // Previous/next post navigation.
  28. if (function_exists("pagination")) : pagination(); endif;
  29. else :
  30. // If no content, include the "No posts found" template.
  31. get_template_part( 'content', 'none' );
  32. endif;
  33. ?>
  34. </div><!-- #content -->
  35. </div><!-- #primary -->
  36. </div><!-- #main-content -->
  37. <?php
  38. get_footer();