Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Filtering problems
- This topic has 6 replies, 2 voices, and was last updated 8 years, 10 months ago by
Proovikas.
-
AuthorPosts
-
July 27, 2017 at 11:30 am #13996
Proovikas
ParticipantHi,
i have your ajax search pro plugin and it is not working like i want. My filter looks like this: https://prnt.sc/g0woh6 and backend: https://prnt.sc/g0wuea . As you see i have members list and every member has 2 categorys.
What i want: I would like to search members by name (none of the categorys are not activated) and also filter by categorys. Like if i choose one category then it will show these members who are in this categorys.
For example i have a member: https://prnt.sc/g0wuea and he is in department categorys as a Toitumine and in designations categorys as a Persoonid. So in my front end if i write member name then i would like to see him (all filters are deactivated). AND if i don’t know member name but i would like to filter by categorys then it will show me only this categorys members what i activated in filter.
I sent you my site details and you can see there how it is.
FYI i am using also this function: https://wp-dreams.com/forums/topic/filtering-and-showing-in-a-right-place/
I really appreciate if you can help me out:)
July 28, 2017 at 6:28 pm #14028Ernest Marcinko
KeymasterHi,
Thank you for the proper details, it made my work much easier!
The problem was that the code was not working because of one missing line not accounting for different configuration, I have corrected that, now it should be okay.
For future refernce, this is the changed code:August 1, 2017 at 7:32 am #14058Proovikas
ParticipantHi,
sadly not working correctly. As you see i have 4 members and one members is in “Toitumine” catogory (only one member, nobody else): https://prnt.sc/g2u7zd
and if i try to filter this member out then i check this category in filter: https://prnt.sc/g2u95z and sadly result showing me all members: https://prnt.sc/g2u9okCorrect result should be only one member “Minu kolmas”.
August 1, 2017 at 9:45 am #14060Ernest Marcinko
KeymasterHi!
It’s because the taxonomy group logic is set to ‘OR’ instead of the default ‘AND’, you can change that here: http://i.imgur.com/lxNpWEl.png
The current configuration basically means, that ‘Display the results if any of team_department OR the team_designation filter matches.’
If you change that back to the default ‘AND’, then a result has to match both filters, if any of the values are checked.August 1, 2017 at 12:27 pm #14069Proovikas
ParticipantPerfect, it works!
I have one more tiny problem. Right now if i search by name: https://prnt.sc/g2xlqw then you will see i have 2 result. It looks like it is searching titles, where one of these words what i inserted must match. i would like that both words must match and if i insert only one word then it will show these people who has this in name.
It is hard to explaine, hopefully you will understand:)August 1, 2017 at 2:31 pm #14070Ernest Marcinko
KeymasterHi!
I believe you are looking for the ‘AND’ keyword logic, which you can change on the General Options -> Logic & Behavior panel: http://i.imgur.com/Z7Kze6M.png
That will do the trick for you.
August 1, 2017 at 2:39 pm #14071Proovikas
ParticipantPerfect! Thanks a lot!
-
AuthorPosts
- You must be logged in to reply to this topic.