1. We are trying to build a search page where users can filter on custom post details AND on a second post type that is connected by a many-to-many relationship.
In more detail - We have created a custom post type 'CLINIC' with a few custom fields. Then we have a second custom post type: 'DOCTOR'. A CLINIC can have one or more DOCTORs. This is specified by a many to many relationship. We have successfully built a search page using a View with the following filters:
- Relevanssi text search (can search CLINIC text content)
- City (CLINIC custom field)
- Province (CLINIC custom field)
However, we'd like two more options for users and have not been able to implement these:
- text search to also include DOCTOR names
- dropdown of DOCTOR names
Hello. Thank you for contacting the Toolset support.
I checked the problem URL you shared and I see you added the text search to search - Relevanssi text search (can search CLINIC text content). But you will have to add search button as you can not perform text search without search button.
Normally - you can only add frontend filters (custom search filter) to your view with taxonomy/custom fields which are attached to your post type to which your view is set to query.
For example,
- You have post type X where you assign taxonomy "color" and custom fields (min,max)
- You have post type Y where you assign taxonomy "years" and custom fields (name,surname)
So, if you want to create a custom search for post type X, you can only add frontend filters for taxonomy "color" and custom fields (min,max). You can not build a custom search by adding taxonomy "years" or custom fields (name,surname) as these taxonomy/custom fields are belongs to post type Y.
If you can share admin access details and once I see your structure I will be able to guide you in the right direction.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
We will make your suggested edit but in the meantime, now that you have admin access, have you had a chance to login and check structure to make sure everything is correct?