search.php 1.2 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. <section id="primary" class="content-area">
  11. <div id="content" class="site-content" role="main">
  12. <?php if ( have_posts() ) : ?>
  13. <header class="page-header">
  14. <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
  15. </header><!-- .page-header -->
  16. <?php
  17. // Start the Loop.
  18. while ( have_posts() ) : the_post();
  19. /*
  20. * Include the post format-specific template for the content. If you want to
  21. * use this in a child theme, then include a file called called content-___.php
  22. * (where ___ is the post format) and that will be used instead.
  23. */
  24. get_template_part( 'content', get_post_format() );
  25. endwhile;
  26. // Previous/next post navigation.
  27. twentyfourteen_paging_nav();
  28. else :
  29. // If no content, include the "No posts found" template.
  30. get_template_part( 'content', 'none' );
  31. endif;
  32. ?>
  33. </div><!-- #content -->
  34. </section><!-- #primary -->
  35. <?php
  36. get_sidebar( 'content' );
  37. get_sidebar();
  38. get_footer();