Filter does not show results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Filter does not show results

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 weeks, 4 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39209
    omkb78
    omkb78
    Participant

    Hello AJAX Search Pro Support,

    we already included several search bars with the help of your plugin, but I struggle with the one on https://omkb.de/events/ right now.

    No matter what I do, if I select a city on the left, the result is always “No results found!”.

    I added the necessary css class to the elementor loop on the right side.

    Can you help me to solve the problem?

    I am looking forward to your reply!

    Regards
    Thomas

    #39216
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Thomas,

    Is the page by any chance a post type archive or any other type of archive page? If yes, than that is the problem. The filtering will not affect the archive pages unfortunately. If you check the documentation, it will instruct to create a new page for the widgets for filtering.

    Best,
    Ernest Marcinko

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


    #39217
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Correction – you can still check if the filter was created correctly. In case of custom field filters the most likely issue is using the wrong operator. Usually the correct one for tex values is the like operator as well as the checkbox logic as “or”: https://i.imgur.com/UOI3VwS.png

    Best,
    Ernest Marcinko

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


    #39226
    omkb78
    omkb78
    Participant

    Hi Ernest,

    using the “OR” and “LIKE” solves the problem, thank you. I had “EQUALS” before. Well, if the content is the very same, “LIKE” OR “EQUALS” should technically lead to the same result, but I remember I ran into the very same problem with the google tag manager back in the days, which had been solves my “LIKE” instead of “EQUALS” as well. Do you have an idea why (in case of your plugin of course)?

    What I wanted to add/note:
    We are using the plugin for all of our cpt and cpt archive pages and it works just fine. I usually just duplicate the created filters and slightly alter them. I am just confused why you mentioned “Is the page by any chance a post type archive or any other type of archive page? If yes, than that is the problem. The filtering will not affect the archive pages unfortunately.” Or is that the part your correction is about?

    Regards
    Thomas

    #39227
    omkb78
    omkb78
    Participant

    Similarly, I noticed the search bar on https://omkb.de/events/ does not show your event “Contra” in case I search for “a”, because Contra does not start with an “a” as the very first letter. Can you tell me how I can fix that as well?

    #39232
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    “Is the page by any chance a post type archive or any other type of archive page? If yes, than that is the problem. The filtering will not affect the archive pages unfortunately.” Or is that the part your correction is about?

    Sort of, it does not officially support that yet – but there are cases when it could actually work. Your case in theory should work regardless if the Events page is an archive page. I can’t say for sure, but it should.

    I guess GTAG used numerical values for some of the fields, and might have tighter type casting (where you can’t mix up numeric and text values). In this case, when the EQUALS is used, the database will treat the field value as numerical and typecast it to a number if it’s not – and that of course does not match anything.

    As for the “a” character, check the search logic configuration, so that the minimum number of characters for words is set to 1: https://i.imgur.com/IdR5MKh.png
    Otherwise a shorter keyword is only partially checked agains the beginnings of the fields.

    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.