Skip Navigation

[Closed] 1 search box, searching 2 separate CPTs

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
- 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 1 reply, has 2 voices.

Last updated by Minesh 1 year, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2591029

Jay

I have 2 CPTs. One is Locations (parent) The second is Spaces within a location (Child) So the 1st CPT is a film location lets say a villa. Then in the second CPT are all the spaces within the parent location. the swimming pool, each bedroom and the kitchen.

Both CPTs share the same Taxonomies. Type of building, type of water, landscape, overall style etc.

Is it possible for a search to search both CPT and then display the results on a single results page?

Please say yes.
Has anybody written a similar code before. Im happy to pay something for the snippet (If that's what it is)
Or is there a better way to approach this challenge?

hidden link

#2591613

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

What if you set your view to query both of your desired post types from the content selection section but the thing is that how exactly you would like to display the results.

If you will require to display the results like:
- parent 1
-- child 1
-- child 2
-- child 3
- parent 2
-- child 4
-- child 5

In such a case you will have to create a nested views (view inside view) and in that case you will have to use classic views as block type view do not support nested views.

The topic ‘[Closed] 1 search box, searching 2 separate CPTs’ is closed to new replies.