search.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * The Search Results template
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty Ten
  7. * @since 3.0.0
  8. */
  9. ?>
  10. <?php get_header(); ?>
  11. <div id="container">
  12. <div id="content">
  13. <?php if ( have_posts() ) : ?>
  14. <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
  15. <?php
  16. /* Run the loop for the search to output the results.
  17. * If you want to overload this in a child theme then include a file
  18. * called loop-search.php and that will be used instead.
  19. */
  20. get_template_part( 'loop', 'search' );
  21. ?>
  22. <?php else : ?>
  23. <div id="post-0" class="post no-results not-found">
  24. <h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2>
  25. <div class="entry-content">
  26. <p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyten' ); ?></p>
  27. <?php get_search_form(); ?>
  28. </div><!-- .entry-content -->
  29. </div>
  30. <?php endif; ?>
  31. </div><!-- #content -->
  32. </div><!-- #container -->
  33. <?php get_sidebar(); ?>
  34. <?php get_footer(); ?>