Hi I have a custom field in a child post that describes medicinal complaints. I need to input terms (eg. "runny nose", "backache") and then search all the medical complaints for those terms and return the title of the parent post of those complaints.
How would I construct the view for such a query?
Thanks for any help
Hello. Thank you for contacting the Toolset support.
Can you please tell me how you setup your custom field in child post type. Is it a select field or normal single field or it's a repeating single field?
Also, you say you want to search the term, how exactly you want to search the term, do you want to prefilter the result or you want to allow the user to input or select the term?
Hi Minesh, Thanks for your help.
Here's a couple of screenshots of the field
I have it as a custom field in the child post - complaint-use-cf, complaint-use and the same content as a taxonomy - complaint-use-tax.
I'd like the user to be able to enter several words or a phrase to search for eg. stomach cancer, "sore throat".
Thanks
Hi Minesh,
I setup and populated the complaint-use both as a custom field and a taxonomy 'cause I wasn't sure of the best/easiest way to search. Appreciate any code snippets for your suggestion to create a view (especially how to look for words or phrase in complaint-use), and add a frontend filter. Will also check the link.
Thanks
There is no code snippet you need to add, you need to create view with text search filter. I suggest you should go throw the above link step by step and let me know if you will require further help.
Thanks Minesh, exactly what I needed will go through as you suggest.
One question the output - parent title - needs to be unique, several child posts may return the same parent, I need the parent title to appear once in the output, any advice how to do this?
For that we can use the View's hook and that is another question.
Lets fix the issues one by one. Can you please first create your search, once that is setup and working, we will try to address your group by parent title question.
Hi Minesh,
I've followed the relevanssi integration and installed the indexes, and created the custom search.
I'm not seeing any search results. Haven't specified parent post title for output
Would like this view to output a list of (unique) parent post titles on a separate page.
the view code is:
Can you please send me problem URL where you added your view as well as what view you created with search box?
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.
After login to admin, I found that you are using outdated Toolset plugins. We always recommend running your site with the latest stable release plugin version.
*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page OR you can update it from your plugins page.
=> https://toolset.com/account/downloads/