Skip Navigation

[Resolved] Need help changing the filter that we're using on our Doctor Finder

This support ticket is created 4 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 4 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1818485

Thanks Luo!

I have the locations and accepting statuses working and setup sitewide, if you don't mind I just need help changing the filter that we're using on our Doctor Finder and then we're ready to push the staging site live.

Below is a link to the View for the form, can you tell me what needs to be changed there so that the search results give only the doctors who are accepting patients (along with their location)?

hidden link

Here is the link to the Find a Doctor page, we use the same search form on the website homepage.

hidden link

Thanks again very much!!

#1818589
relationship-filter2.JPG

Hello,

Thanks for the details, I have done below modifications in your website:
Edit the post view:
hidden link
Remove the taxonomy "Location" filter, replace it with a relationship filter

See my screenshot: relationship-filter2

Please test again, check if it is what you want. thanks

#1822693

Hi Luo,

My apologies, but I have one more question related to this request.

On the Find a Doctor page hidden link how can I filter the search form results that appear under "Doctors Accepting Patients" so that it only displays the doctors who have been marked "Yes" (id=1)? On page load, it lists all doctors, regardless of their accepting status.

Thanks very much for the help!

#1824363

After use choose an option in the dropdown "Choose your location", within View's loop, you can get the custom checkboxes field value "Accepting Patients" of intermediate post type "Accepting Patients":

[types field='accepting-patients' option="0" item='@accepting-patient.intermediary'][/types]

The attribute option="0" means if the intermediate post type "Accepting Patients" post has enabled the first option "Yes".

Then use above custom shortcode as [wpv-conditional] shortcode condition, see the demo in your website:
hidden link
section "Loop Editor", line 9 and 16:

[wpv-conditional if="( '[types field='accepting-patients' option="0" item='@accepting-patient.intermediary'][/types]' eq '1' )"]
...
[/wpv-conditional]

Test it in front-end, for example:
hidden link

Please notice, that [wpv-conditional] works only after user choose an option in the dropdown "Choose your location".