Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › filters
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years, 7 months ago.
- AuthorPosts
- October 28, 2019 at 7:17 pm #24452
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 youOctober 29, 2019 at 1:44 pm #24457Hi,
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.
Best,
– Filter configuration: https://i.imgur.com/j0sVl8h.png
– Other configuration: https://i.imgur.com/l4IttoO.png
It may actually work.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 29, 2019 at 4:53 pm #24459Thank 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?
October 29, 2019 at 5:42 pm #24460Hi,
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 :)
- AuthorPosts
You must be logged in to reply to this topic.