filters

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24452
    asthyanax12
    asthyanax12
    Participant

    Hi,
    I’m wondering about filters. What I’d like to do is having a filter that when checked show all the results for a filed that is NOT empty.
    I’m using ACF Pro with urls are fields. I want to filter if a field is not empty. I’m not too sure how to do that.
    So for example having a checkbox: X Website and if checked it displays all the results where the URL field is not empty…if it makes sense.
    Thank you

    #24457
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Well, in case of URLs, you could make a simple checkbox filter, and use a value like “http” or so, since all URLs contain that string. If that string is matched, then it will display the results.
    – Filter configuration: https://i.imgur.com/j0sVl8h.png
    – Other configuration: https://i.imgur.com/l4IttoO.png
    It may actually work.

    Best,
    Ernest Marcinko

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


    #24459
    asthyanax12
    asthyanax12
    Participant

    Thank you. I’ll try that. To extend the question…there’s non way to search for value not being empty? I have a few custom fields on posts and I want to search if they are empty or not. So for example I’m using ACF Pro with a repeater field with images. I want to filter posts that do have any picture from that field. Is that something possible?

    #24460
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Well, the query can only check if a specific character/set of characters is present within the field contents. The empty filters are automatically removed. If possible, I would recommend checking against a short string, or a character, as I mentioned above.

    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.