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!!
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
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!
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".