Results Page Doesn't Maintain Filters

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Results Page Doesn't Maintain Filters

This topic contains 5 replies, has 2 voices, and was last updated by

 
Keymaster
3 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20733

    Participant

    If 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.

    #20739

    Hi!

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

    Now, 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20750

    Participant

    That 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.

    Attachments:
    You must be logged in to view attached files.
    #20755

    Hi!

    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20763

    Participant

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

    #20772

    Hi,

    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.