Skip Navigation

[Resolved] Find CPT by including values of relationship CPT

This support ticket is created 5 years, 4 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 5 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#1409885

Tell us what you are trying to do?
I have a Many-To-Many relationship between "seminar" and "referent".
I have created a view where "seminars" are shown. The view has a [wpv-filter-search-box].
The results when searching for something that is directly entered into the CPT "seminar" are good.
Now I also want "seminars" to be shown where the searched string belongs to the associated CPT "referent".
The CPT "referent" should not be shown but should only be used to find the "seminar".
Thank you. Greetings Michael

What is the link to your site?
hidden link

#1411091

Hi Michael,

Thank you for contacting us and I'd be happy to assist.

The Toolset Views text search feature uses WordPress's own search which only supports searching through the title and content of the posts from the selected post type.

This means that searching through the connected "referent" posts won't be possible, but you can use a workaround.

You can include a custom field in "seminar" post type and include the terms related to connected "referent" posts in that field.

After that, you can use the Relevanssi plugin to extend the text search to also include results based on that custom field values from the "seminar" post type.
https://toolset.com/documentation/user-guides/views/searching-texts-custom-fields-views-relevanssi/

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar