Forums Forums Search & Filter Pro Pagination not working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #16600

    I am working on our staging environment to get the search filter plugin working properly.
    The plugin is pulling results correctly however pagination is not working.
    I have the search filter plugin in the right sidebar under “new search” and the standard WP search is under “old search”.

    When I search “How it works” under the RCRtv category the results post however I cannot paginate through the results.
    http://rcrwireless1.staging.wpengine.com/search/?s=how+it+works&post_types=rcrtv

    When you click to paginate over to the next page the URL displays like the following:
    http://rcrwireless1.staging.wpengine.com/search/?s=how+it+works&post_types=rcrtv#038;post_types=rcrtv/page/2

    Which is not working but when I move “/page/2” to the beginning of the string the page will reload with the 2nd page of results:
    http://rcrwireless1.staging.wpengine.com/search/page/2/?s=how+it+works&post_types=rcrtv#038;post_types=rcrtv/

    We are using a custom permalink structure:
    /%year%%monthnum%%day%/%category%/%postname%

    However when I switch the permalink structure to any other option pagination still does not work.
    The only permalink structure that works correctly with the pagination is the default permalink structure.

    Ross Moderator
    #16606

    Hi Jarad

    I had a quick look. How are you generating your pagination links?

    Can you try to use the default WordPress links (for older/newer) as a test?

    https://codex.wordpress.org/Pagination

    Basically, S&F doesn’t do anything to you pagination in this scenario – the pagination is being created in the absolute standard way your theme would do for any other page.

    Now if your theme uses its own custom pagination, there may be problems in the way this is generated.

    To allow pagination, and keep things in the URL like post_types all S&F (and other plugins) have to do is register the variables so they are “remembered” – https://developer.wordpress.org/reference/functions/add_query_arg/

    It looks like somethign strange is happening in your setup, even a possible double encoding of the URL:

    s=how+it+works&post_types=rcrtv#038;post_types=rcrtv/page/2

    Whatever is “making” your pagination links isn’t doing it properly I don’t believe – and not accomodating for other WP usage…

    Please try to use the above functions I reference (I know you don’t want those, but as a test, because the WordPress pagination functions handle these things properly)….

    If this works, but of course you don’t want this kind of pagination – I suggest integrating the wp_pagenavi plugin – which allows for numbering like you have:

    https://wordpress.org/plugins/wp-pagenavi/

    Thanks!

    Anonymous
    #16856

    Ross

    We were able to pin point the area that was effecting the pagination issue which wasn’t anything you suggested, however it was due to a snippet of php in the home page loop in the theme (the site uses the same loop for searches).
    We were able to resolve the issue with the php which now allows the pagination to work.

    But thank you for the insight into pagination, this information may help someone in the future with a similar issue.

    Cheers.

    Ross Moderator
    #16866

    Cool no worries, glad you got it sorted 🙂

Viewing 4 posts - 1 through 4 (of 4 total)