PageRenderTime 42ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://github.com/Bochet/festival_lgbt
PHP | 67 lines | 42 code | 16 blank | 9 comment | 7 complexity | 6f5460beff536dce14bfe56c7c0a32b9 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 Simple_Catch
  7. * @since Simple Catch 1.0
  8. */
  9. get_header();
  10. if( function_exists( 'simplecatch_display_div' ) ) {
  11. $themeoption_layout = simplecatch_display_div();
  12. }
  13. if (have_posts()): ?>
  14. <h2 class="entry-title"><?php printf( __( 'Showing results for: <span class="img-title">%s</span>', 'simplecatch' ), get_search_query() ); ?></h2>
  15. <?php while (have_posts()) : the_post(); ?>
  16. <div <?php post_class();?>>
  17. <h3><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>"><?php the_title(); ?></a></h3>
  18. <?php the_excerpt(); ?>
  19. <div class="row-end"></div>
  20. </div> <!-- .post -->
  21. <?php endwhile;
  22. // Checking WP Page Numbers plugin exist
  23. if ( function_exists('wp_pagenavi' ) ) :
  24. wp_pagenavi();
  25. // Checking WP-PageNaviplugin exist
  26. elseif ( function_exists('wp_page_numbers' ) ) :
  27. wp_page_numbers();
  28. else: ?>
  29. <ul class="default-wp-page">
  30. <li class="previous"><?php next_posts_link( __( 'Previous', 'simplecatch' ) ); ?></li>
  31. <li class="next"><?php previous_posts_link( __( 'Next', 'simplecatch' ) ); ?></li>
  32. </ul>
  33. <?php endif;
  34. else : ?>
  35. <h2><?php printf( __( 'Your search <span> "%s" </span> did not match any documents', 'simplecatch' ), get_search_query() ); ?></h2>
  36. <div class="post">
  37. <h5><?php _e( 'A few suggestions', 'simplecatch' ); ?></h5>
  38. <ul>
  39. <li><?php _e( 'Make sure all words are spelled correctly', 'simplecatch' ); ?></li>
  40. <li><?php _e( 'Try different keywords', 'simplecatch' ); ?></li>
  41. <li><?php _e( 'Try more general keywords', 'simplecatch' ); ?></li>
  42. </ul>
  43. </div> <!-- .post -->
  44. <?php endif; ?>
  45. </div> <!-- #content -->
  46. <?php
  47. if( $themeoption_layout == 'right-sidebar' ) {
  48. get_sidebar();
  49. }?>
  50. </div> <!-- #main -->
  51. <?php get_footer(); ?>