Skip Navigation

[Resolved] Search on post type and child in the same time

This support ticket is created 6 years, 8 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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#626033

Hello,

I would like to know if we could search on post type and their childs in the same time.

Example : We have houses and rooms.

I would like to search all houses that they have rooms with color red.

And if it is possible, could i list the houses and if i want could i list just rooms ? Modifier

#626052

Hello,

I assume we are talking about this case:
Parent post type "Houses"
- Child post type "Rooms", with custom field "color"

In your case, I suggest you setup a view to list "Rooms" posts, filter by the custom field "color", and display it's parent "houses" post information:
https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/