Saltar navegación

[Cerrado] 1 search box, searching 2 separate CPTs

This support ticket is created 3 years, 1 month 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
- 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 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Minesh 3 years, 1 month ago.

Asistido por: Minesh.

Autor
Mensajes
#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?

enlace oculto

#2591613

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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.

El debate ‘[Cerrado] 1 search box, searching 2 separate CPTs’ está cerrado y no admite más respuestas.