Skip Navigation

[Resolved] want two text searches (post types & custom post types) tites in one view

This support ticket is created 5 years 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by andrewD-10 5 years ago.

Assisted by: Nigel.

Author
Posts
#1390807
agency title.png
agency title front.png

Tell us what you are trying to do?
Hi team Toolset!
i want to have two text searches working in one view (a table) , one to search in posts(Projects) titles and second for post types (Agencies) titles hidden link. In my table view i have post titles and agencies titles. hidden link & hidden link .

Text search for post title is working fine which pulls out all the posts containing searched phrase.
i want the text search working same way for agencies titles to pull out posts containing searched phrase. lets i search southern California in agency title and relevant post row comesup hidden link

Is there any documentation that you are following?

i have followed the link below but could not get it in my scenario. i have installed Relevanssi plugin free version and setup according to link description.
https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/

Is there a similar example that we can see?
Not sure
What is the link to your site?
hidden link

Your Help to your best will be much appreciated
Thanks

#1390909

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Andrew

I'm sorry to say that's currently not possible.

Views are a user-friendly wrapper for the WordPress WP_Query class that retrieves posts from the database, and with that it is only possible to query posts by properties of the posts being queried.

In your example your View is querying Projects, so you can only filter the query by properties of Projects, meaning you cannot filter the results by Agencies. (Your example is a special case inasmuch as it is a text search, but the underlying principle is the same.)

To search for Agencies you need a View that queries Agencies.

The underlying queries can be modified so that you can filter one type of posts by properties of another related type of posts, but we haven't added that functionality yet.

I very much encourage you to submit a feature request (at https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/) so that the product manager is aware of the demand when prioritising development.

#1394951

Thank you!