This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: ASP to search within a range of dates

Home Forums Product Support Forums Ajax Search Pro for WordPress Support ASP to search within a range of dates Reply To: ASP to search within a range of dates

#53283
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

For this type of filter to work the dates must be in a completely separate field I’m afraid, otherwise it’s going to be extremely complicated. During the search the plugin compares the dates of the field. It is not possible to simply compare parts of the string as the comparision is done within the SQL query and it can’t split the field by commas, as it expect as date value, not a comma separated list of dates.

I usually suggest a custom code snippet where I can, but this is much more complicated than that. The only possible solution I can see to this is by modifying the query arguments via asp_query_args to actually remove the date filter (or modify it so it does not apply during search). Then hook into asp_results to programmatically check the dates via a foreach loop and unset (remove) the unwanted results that does not fit the criteria.

If you need professional help with that, I recommend our affiliates at wpkraken. I get asked for custom jobs a lot, but unfortunately I already have 10+ hours of work every day, 7 days a week, so I recommend them 🙂