Forums › Forums › Search & Filter Pro › site search pagination broken
Tagged: pagination, search
- This topic has 8 replies, 2 voices, and was last updated 5 years, 4 months ago by Anonymous.
-
Anonymous(Private) June 28, 2019 at 9:46 pm #215280
Hi,
We’re using Search & Filter Pro on our site to filter a specific custom post type (courses). This is working great on the category page for that post type.However, we noticed recently that the pagination on our sitewide searches is now partially broken. We are using Relevanssi for search. If the search results happen to include a course custom post, then the URL for the pagination changes to the path in the Results URL field that we set for our search form and also has an extra &sf_paged option. E.g., the pagination link for page 2 becomes https://oursite.com/course/?s=test&sf_paged=2 (which causes a 404 error) instead of https://oursite.com/page/2/?s=test (which works). Sitewide searches that do not include a course in the results have the correct URL for pagination and work fine.
I can provide you with access to our site as well as specific examples of searches where the issue is occurring if that would be useful. It looks like we are on version 2.4.5 of the plugin. Thanks for your help!
Matt
Trevor(Private) July 4, 2019 at 2:48 pm #215586That shortcode is then included in a page or page template? Does the issue happen if you comment out that one line (of course that would disable our search)?
What I suspect is happening is that our form code is intercepting both the S&F search, as it is supposed to, but also a normal theme search.
Is there a possibility that the code you showed me is used on both pages? If the pages are different (for example, if one is a real WordPress page, you could enclose that one line of code inside an IF to test if it is the right page for an S&F search results page.
-
AuthorPosts