Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Exclude results by custom foelds
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 2 months ago.
- AuthorPosts
- July 10, 2020 at 12:02 pm #28373
Hello,
I’m using Ajax search pro to make conference proceedings searchable.This works pretty good. Now I would like to exclude some pdf files from the search. Therefore I’ve read your tutorial about using custom fields to exclude results from the search.
I’ve installed advanced custom fields and added a custom field to the pff attachements called nicht_durchsuchen
Then I added a filter in ajax search pro to exclude all the pdf files with this custom field set to 1.
If you type in the search string “patronage” there are a lof of results that should be supressed. What is wrong in my setup?
regards
MarkusJuly 10, 2020 at 12:07 pm #28374Hi Markus,
Thank you very much for the details!
If you are using attachments by any chance, then make sure to enable this option: https://i.imgur.com/hoc50t9.png
Best,
That should resolve the issue.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 10, 2020 at 12:18 pm #28375Thank you.
Now I can tell the system which pdf files it should make searchable. But I can’t exclude several pdf files. If I use the LIKE operator only the files with the custom fields value 1 are searchable. If I use the operator NOT LIKE operator I get no results at all.
I’m a bit confused.July 10, 2020 at 12:46 pm #28376Because “NOT LIKE 1” will exclude everything that has a value ot 1 on that field, as well as the results where the field is not defined – in your case everything.
Best,
If you want to include results that does not have the field defined, then enable this option. Then using the NOT LIKE 1 will exclude everything where the value is 1, but include where it’s not defined.
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.