The Doctor CPT has two taxonomy's setup, Specialty and Locations. I also need to allow the users to filter the list of doctors by Specialty and/or Location and have a search box where they can type a name in and search for that name.
I installed Beautiful Taxonomy Filters, but when I select the Specialty or Location it doesn't change what loads on the page.
I'm looking for a solution that will show all doctors when they first go to the archive page, and the will have the option of narrowing down the list based on their selection.
I have a custom post type called "doctor", this is the query I have set for displaying all the posts in the archive template:
The Doctor CPT has two taxonomy's setup, Specialty and Locations. I also need to allow the users to filter the list of doctors by Specialty and/or Location and have a search box where they can type a name in and search for that name.
I installed Beautiful Taxonomy Filters, but when I select the Specialty or Location it doesn't change what loads on the page.
I'm looking for a solution that will show all doctors when they first go to the archive page, and the will have the option of narrowing down the list based on their selection.
wp-query
search
custom-post-type-archives
Share
Improve this question
asked Oct 4, 2018 at 16:37
Chris WathenChris Wathen311 silver badge22 bronze badges2
If you are looking for filter's I would recommend using facetWP. I've been using this plugin for a while and it has never failed me. The only issue i've ran into were on my end AKA (not properly configuration). Once properly configured, they worked like a charm. facetwp It's either this or you could, you could use isotpe.js for custom filtering
– bagpipper
CommentedOct 4, 2018 at 16:42
So what is the problem, exactly? With some research on WP_Query arguments and taxonomy helper functions, this can be done quite easily. Have you tried anything, code-wise? If so, please show your efforts and tell us about the specific problems you are facing.
– Hans
CommentedOct 4, 2018 at 22:10
There might be an easier way of doing this, but I created a text field where they can type a name and I also included two other select fields to select the Location and/or Specialty. I then pull the data in from the URL to modify the query.