Skip Navigation

[Résolu] Searching in related post using relevanssi

This support ticket is created Il y a 2 années et 3 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 réponses, has 2 voix.

Last updated by marcB-6 Il y a 2 années et 3 mois.

Assisted by: Minesh.

Auteur
Publications
#2269193

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!

#2269553

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

First of all, we offer Relavanssi integration to search within the custom fields and taxonomies:
- https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/

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.

#2269747

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

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.