PageRenderTime 51ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/catch-box/search.php

https://github.com/ActivateNY/activateny.org
PHP | 54 lines | 29 code | 14 blank | 11 comment | 3 complexity | 7e3e33ef4ad3aff6b9f3b4f25363a896 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * The template for displaying Search Results pages.
  4. *
  5. * @package Catch Themes
  6. * @subpackage Catch_Box
  7. * @since Catch Box 1.0
  8. */
  9. get_header(); ?>
  10. <?php if ( have_posts() ) : ?>
  11. <header class="page-header">
  12. <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'catchbox' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
  13. </header>
  14. <?php catchbox_content_nav( 'nav-above' ); ?>
  15. <?php /* Start the Loop */ ?>
  16. <?php while ( have_posts() ) : the_post(); ?>
  17. <?php
  18. /* Include the Post-Format-specific template for the content.
  19. * If you want to overload this in a child theme then include a file
  20. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  21. */
  22. get_template_part( 'content', get_post_format() );
  23. ?>
  24. <?php endwhile; ?>
  25. <?php catchbox_content_nav( 'nav-below' ); ?>
  26. <?php else : ?>
  27. <article id="post-0" class="post no-results not-found">
  28. <header class="entry-header">
  29. <h1 class="entry-title"><?php _e( 'Nothing Found', 'catchbox' ); ?></h1>
  30. </header><!-- .entry-header -->
  31. <div class="entry-content">
  32. <p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'catchbox' ); ?></p>
  33. <?php get_search_form(); ?>
  34. </div><!-- .entry-content -->
  35. </article><!-- #post-0 -->
  36. <?php endif; ?>
  37. </div><!-- #content -->
  38. </div><!-- #primary -->
  39. <?php get_sidebar(); ?>
  40. <?php get_footer(); ?>