Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Results Page Doesn't Maintain Filters
- This topic has 5 replies, 2 voices, and was last updated 7 years, 4 months ago by
Ernest Marcinko.
-
AuthorPosts
-
January 14, 2019 at 11:53 pm #20733
andisites
ParticipantIf we change the filters on the above URL, then search, the filters are reset when displaying the results. Then, even from the results page, if we change the filters and search again, the filters are again reset. So, in essence, we aren’t able to filter our search.
January 15, 2019 at 10:58 am #20739Ernest Marcinko
KeymasterHi!
Thank you for all the details, I can confirm this is an issue related to the post type filters, and I was able to replicate it on our test server as well. I have managed to construct a fix, but it requires replacing one of the plugin files. Please follow the instructions below:
1. Before starting, make sure to have a site back-up, just in case.
2. Open up the wp-content/plugins/ajax-search-pro/includes/views/asp.shortcode.custom_post_types.php file on your server via FTP/SFTP
3. Replace it’s contents with this.
4. Save the file, and reload the site front-endNow, the search should properly pre-select the filters passed on to the results page. Let me know if you need help with the file replacement.
January 15, 2019 at 10:13 pm #20750andisites
ParticipantThat code worked for the filters being checked/unchecked correctly, however the results still contain post types that weren’t checked in the filters.
In the attached search, I searched for “desk” and checked only Projects.
January 16, 2019 at 10:33 am #20755Ernest Marcinko
KeymasterHi!
I believe the search results page override is not working. This only happens if there is another plugin overriding the search results already, or there is a custom query embedded into the search results page (which should not be there). In most cases it’s the custom query.
I recommend checking for other search plugins, if any is active, as well as removing any custom queries from the search page, so that the plugin can override the main query.If you want me to check on that, you can add temporary FTP details, and I will look up the theme files to see if there is anything strange there.
January 16, 2019 at 5:48 pm #20763andisites
ParticipantI see. We have Relevanssi installed on the site, so it looks like that is overriding the results filters?
Would sending to a custom results page (rather than the default search results page) change that? I tried sending to this results page: https://www.fairfieldworld.com/custom-search/custom-results/
I set the “Custom redirect URL” setting to “custom-search/custom-results/”, but we get a Page not found error when doing a search on https://www.fairfieldworld.com/custom-search/
January 17, 2019 at 9:00 am #20772Ernest Marcinko
KeymasterHi,
It is very much likely that Relevanssi overrides the final results there.
Sending to a custom page would not change that, as the custom results URL option does not change the results URL, it is used in cases when there is a custom results page permalink structure is in effect, so the plugin can adopt that. It is however not possible to have two logically separate results pages, as it always processed by the same WordPress core handler, and the override would trigger every time.
-
AuthorPosts
- You must be logged in to reply to this topic.