-
Search Results
-
Hello,
We’ve used this plugin on a few sites and it has worked great! So thanks for the awesome plugin.
On both of those sites we’ve done the pagination with the WP-PageNavi plugin which is suggested in the default results.php template you provide. My question is, how can I use Search And Filter with native WP pagination?
Right now I have a site that uses the Search And Filter and uses AJAX refresh. When I click the numbers in the pagination, the results refresh properly, but the pagination styles don’t change to reflect that. The current page number doesn’t change, and the previous page link does not show up. Additionally, clicking the next page link works the first time, but the second time it’s clicked it goes back to the original results (page 1).
Here’s the code I’m using for the pagination inside the results.php file (theme/search-filer/results.php):
<?php // Pagination $total = $query->max_num_pages; // only bother with pagination if we have more than 1 page if ( $total > 1 ) : ?> <nav class="pagination text-center"> <?php // Set up pagination to use later on $big = 999999999; // need an unlikely integer $pagination = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('sf_paged') ), 'total' => $total, 'type' => 'plain', 'prev_next' => true, 'prev_text' => __('', 'visceral'), 'next_text' => __('', 'visceral') ) ); echo $pagination; ?> </nav> <?php endif; ?>
Any directions for getting this to work without WP-PageNavi?
Thanks!
TravisTopic: Multiple search fields
Hi, I’m trying to accomplish result where i have two search fields. In the first one i’m going to use for free search and the another is used just for location search. At the moment when i fill the fields and press search the request is recognizing only one of the search fields and fills the other with same text.
I’m displaying results with shortcode and i have created custom results.php in my child-theme. I have Ajax on.
So my question is it possible to get the both search field values into the request?