Forums › Forums › Search & Filter Pro › Search pagination always return the first page
Tagged: pagination
- This topic has 19 replies, 2 voices, and was last updated 5 years, 5 months ago by Trevor.
-
Anonymous(Private) July 12, 2019 at 1:06 pm #216170
Hi,
I have an issue with the pagination, when going to the next pages, it will always show the first page results…
It will work when searching for a term but not when filtering with a category or anything. You can try this on uigarage.net.thanks a lot
Anonymous(Private) July 12, 2019 at 1:23 pm #216179S&F does recognize the WP default pagination https://uigarage.net/platform/ios/page/6/ though..
Trevor(Private) July 12, 2019 at 2:58 pm #216205This looks like it is something to do with the search.php template file. The pagination is not actually made within that file, but by a function in a called template (/pages/gallery.php):
https://www.screencast.com/t/G7alscz1EDDL
I cannot find that function though. Do you know which theme file that function is defined in?
Anonymous(Private) July 12, 2019 at 3:05 pm #216207I was just using the wordpress pagination_links https://codex.wordpress.org/Function_Reference/paginate_links
Should I use something else?
Trevor(Private) July 12, 2019 at 5:36 pm #216230Try something like this:
<div class="pagination"> <div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div> </div>
$query might have to change depending on what your query array is named. It is basic but is a place to start.
Please note that we are closed for the weekend and any replies may be delayed until we open at 10AM (UK time) on Monday.
You might also want to test things out by making a really basic search using the shortcode method to see if it works then:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
-
AuthorPosts