Support Forums

Looking for support? You can access the support system via your account.

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

Tagged: 

Viewing 10 posts - 1 through 10 (of 20 total)
  • Philippe Hong
    #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

    Trevor Moderator
    #216173

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

    Philippe Hong
    #216175

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

    Philippe Hong
    #216179

    S&F does recognize the WP default pagination https://uigarage.net/platform/ios/page/6/ though..

    Trevor Moderator
    #216183
    This reply has been marked as private.
    Philippe Hong
    #216187
    This reply has been marked as private.
    Trevor Moderator
    #216205

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

    https://www.screencast.com/t/G7alscz1EDDL

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

    Philippe Hong
    #216207

    I was just using the wordpress pagination_links https://codex.wordpress.org/Function_Reference/paginate_links

    Should I use something else?

    Trevor Moderator
    #216230

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

    Philippe Hong
    #216249

    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.