Support Forums

Support Forums Forums Search & Filter Pro Search pagination always return the first page

This topic is: resolved


Viewing 10 posts - 1 through 10 (of 20 total)
  • Philippe Hong


    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

    thanks a lot

    Trevor Moderator

    It may be that the Ajax Container is wrong. Did it work when this was set to the form default of #main?

    Philippe Hong

    I’ve just tried with #main as the container and it doesn’t work..

    Philippe Hong

    S&F does recognize the WP default pagination though..

    Trevor Moderator
    This reply has been marked as private.
    Philippe Hong
    This reply has been marked as private.
    Trevor Moderator

    This 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):

    I cannot find that function though. Do you know which theme file that function is defined in?

    Philippe Hong

    I was just using the wordpress pagination_links

    Should I use something else?

    Trevor Moderator

    Try 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>

    $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:

    Philippe Hong

    I tried this, but still the same problem.

    I found that the problem only appears with the taxonomy filter ON. If I disable it. everything works fine again. Any idea?

    Thanks for helping.

Viewing 10 posts - 1 through 10 (of 20 total)

The topic ‘Search pagination always return the first page’ is closed to new replies.