Guest User

Untitled

a guest
Oct 18th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  2. <?php endwhile; else: ?>
  3. <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
  4. <?php endif; ?>
  5.  
  6. <?php
  7.  
  8. get_header();
  9. the_post();
  10. ?>
  11.  
  12. <?php define('WP_USE_THEMES', false); get_header(); ?>
  13.  
  14.  
  15. <div class="iecontent">
  16. <div class="g960">
  17. <div id="search">
  18. <div id="search-box">
  19. <form action="<?php bloginfo( 'url' ); ?>" method="get">
  20. <div>
  21.  
  22. <input type="text" name="s" value="<?php echo get_search_query()?>" placeholder="Search..."/>
  23. <input type="submit" name="searchsubmit" value="" class="submit"/>
  24.  
  25. </div>
  26. </form>
  27. </div>
  28. <div id="search-results">
  29. <div class="search-result">
  30. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  31. <?php endwhile; else: ?>
  32. <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
  33. <?php endif; ?>
  34.  
  35. </div>
  36. </div>
  37. <?php wpbeginner_numeric_posts_nav(); ?>
  38. <div class="clearfix"></div>
  39. </div>
  40. </div>
  41. </div>
  42.  
  43. <?php get_footer(); ?>
  44.  
  45. 748 function have_posts() {
  46. 749 global $wp_query;
  47. 750
  48. 751 return $wp_query->have_posts();
  49. 752 }
  50.  
  51. 3520 function have_posts() {
  52. 3521 if ( $this->current_post + 1 < $this->post_count ) {
  53. 3522 return true;
  54. 3523 } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
  55. // truncated
  56.  
  57. if we still have posts to process
  58. while we still have posts to process
  59. mark this post as processed and move to the next one
  60. do things with it ( like printing the title and contents
  61.  
  62. mark the first post as processed
  63. if we still have posts to process
  64. while we still have posts to process
  65. mark this post as processed and move to the next one
  66. do things with it ( like printing the title and contents
  67.  
  68. <?php
  69.  
  70. get_header();
  71. the_post();
  72. ?>
  73.  
  74. <?php define('WP_USE_THEMES', false); get_header(); ?>
Add Comment
Please, Sign In to add comment