Search not working on dev.
authorLaury GvR <laury@gaslightmedia.com>
Mon, 29 Dec 2014 18:21:24 +0000 (13:21 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Mon, 29 Dec 2014 18:21:24 +0000 (13:21 -0500)
home.php
search.php

index 4149386..b57810a 100644 (file)
--- a/home.php
+++ b/home.php
@@ -21,8 +21,7 @@
     </div>
     <div id="blog-posts-over" class="small-12 medium-9 columns">
         
-        <?php $query = new WP_Query( 'showposts=5' ); ?>
-        <?php if($query->have_posts()) : while($query->have_posts()): $query->the_post();?>
+        <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
         <div class="row content" id="blog-posts-container">
             <div class="small-11 small-centered columns">
                 <div class="row">
index 81d1e4d..9c7c906 100644 (file)
@@ -6,8 +6,7 @@
     <h2 class="search-result-header">Search Results for "<?php echo get_search_query(); ?>"</h2>
     <div id="blog-posts-over" class="small-12 columns">
 
-        <?php $query = new WP_Query( 'showposts=5' ); ?>
-        <?php if(have_posts()) : while(have_posts()): the_post();?>
+        <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
         <div class="content" id="blog-posts-container">
             <div class="small-11 small-centered columns">
                 <div class="row">
             </div>
         </div>
         <?php endwhile; ?>
-        <?php do_action('foundationPress_before_pagination'); ?>
-
-       
         <?php if ( function_exists('FoundationPress_pagination') ) { FoundationPress_pagination(); } else if ( is_paged() ) { ?>
 
                <nav id="post-nav">
-                       <div class="post-previous"><?php next_posts_link( __( '&larr; Older posts', 'FoundationPress' ) ); ?></div>
-                       <div class="post-next"><?php previous_posts_link( __( 'Newer posts &rarr;', 'FoundationPress' ) ); ?></div>
+                       <div class="post-previous"><?php next_posts_link( __( '&larr; Older results', 'FoundationPress' ) ); ?></div>
+                       <div class="post-next"><?php previous_posts_link( __( 'Newer results &rarr;', 'FoundationPress' ) ); ?></div>
                </nav>
        <?php } ?>
         <?php else: ?>