Taxonomy filters not behaving correctly

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 Ernest Marcinko 5 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18788
    kesy85
    kesy85
    Participant

    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,
    Stefano

    #18797
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #18798
    kesy85
    kesy85
    Participant

    ok, 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

    #18799
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    No 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 :)


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

You must be logged in to reply to this topic.