Hi guys,
I'm working on a project and I am a bit stuck.
- The website has a custom post type called jobs.
- I've added search to the job overview page by using relevanssi premium in the view.
- Since a job can have one or more synonyms (programmer, developer, IT) we created a post type called 'job title synonyms'.
- In a job title synonym post you can store mulitple job title synonyms from a single line field that allows multiple instances.
- From a job post you can choose a related job title synonym post using a relationship field.
- Now, i want to show the job post in the result when either the post title from the job or a synonym from the related job title synonym post matches the query. However, i'm not sure how to do this.
Can you assist?
Thanks!
And when you use the Relevanssi integration the search control will be passed over to Relevanssi and there is no way to search text within the related posts only. Maybe you can add the text field on the current post type "jobs" that holds the additional synonyms and you should add that text field in the Relevanssi index then its possible.
Yes, our approach would then be more or less the same. We copy the synonym values from the related post into a hidden field that we add in the job post. That hidden field we include in the query and gives the same result.
Thanks Minesh!
Marc