Advertisement
Guest User

Search.php

a guest
Oct 20th, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  
  5. * @package Graphene
  6.  
  7. * @subpackage khairul-syahir.com-v2_Theme
  8.  
  9. */
  10.  
  11. get_header(); ?>
  12.  
  13.  
  14.  
  15. <?php
  16.  
  17. if ( isset( $_GET['search_404'] ) ) {
  18.  
  19. get_template_part('search', '404');
  20.  
  21. } else {
  22.  
  23.  
  24.  
  25. if ( have_posts() ) : ?>
  26.  
  27. <h1 class="page-title archive-title">
  28.  
  29. <?php
  30.  
  31. global $wp_query;
  32.  
  33. /* translators: %1$s is the number of results found, %2$s is the search term */
  34.  
  35. printf( _n( 'Found %1$s search result for keyword: %2$s',
  36.  
  37. 'Found %1$s search results for keyword: %2$s', $wp_query->found_posts, 'graphene'),
  38.  
  39. number_format_i18n( $wp_query->found_posts ),
  40.  
  41. '<span>' . get_search_query() . '</span>'
  42.  
  43. );
  44.  
  45. ?>
  46.  
  47. </h1>
  48.  
  49. <div class="entries-wrapper">
  50.  
  51. <?php
  52.  
  53. while ( have_posts() ) {
  54.  
  55. the_post();
  56.  
  57. get_template_part( 'loop', 'search' );
  58.  
  59. }
  60.  
  61. ?>
  62.  
  63. </div>
  64.  
  65. <?php graphene_posts_nav(); ?>
  66.  
  67.  
  68.  
  69. <?php else : ?>
  70.  
  71. <?php get_template_part( 'loop', 'not-found' ); ?>
  72.  
  73. <?php endif;
  74.  
  75. }
  76.  
  77. ?>
  78.  
  79.  
  80.  
  81. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement