Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Taxonomy filters not behaving correctly
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 10 months ago.
- AuthorPosts
- July 27, 2018 at 9:25 am #18788
Select “filter by localities”: “Brenzone”
you will see 3 results: Hotel Eden, Belfiore Park Hotel and Hotel du Lac. This is correct
Select “filter by facilities”: “spa and wellness” or “fitness center”
Hotel Eden will disappear, this is wrong because it has all “facilities” selected
You can find the place post here https://www.gardalake.com/wp-admin/post.php?post=91&action=edit
Can you please check it? It’s very important because the hotels pays a fee to be on this site and they complains about this kind of things.
Thank you very much,
StefanoJuly 27, 2018 at 1:24 pm #18797Hi Stefano,
Thank you for the details. The configuration seemded perfectly fine, so I logged in via SFTP and debugged the query and the results. Interestingly, the plugin actually did return the correct results (including hotel Eden), so I checked if you have any custom filters in the theme functions.php file, that may alter the final results.
The cause is actually a custom code, that you have on lines 482-515 in the functions.php file in your theme directory. If I disabled it temporarily, the results were returned correctly again. It looks like it is used to override some filters, but it is not working correctly. From the quick look at the code I don’t think it is neccessary, as the get_posts(..) query used in that custom code uses a much different logic to filter the posts, which are then compared and filtered to the final results by the search.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 27, 2018 at 2:09 pm #18798ok, thank you very much I will look in to it, and sorry for wasting your time, this code is there from a lot of time and the bug turned out just some day ago so we were thinking it was a bug in some update but maybe it was just there before and we never noticed it
July 27, 2018 at 2:31 pm #18799No problem at all, I’m glad it works now 🙂
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.