Skip Navigation

[Resolved] View selected by some fields values of child

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 ago.

Assisted by: Minesh.

Author
Posts
#2658185

My PROPERTY CPT have a field "status" which indicates if it is for sale or sold.

This property is in relation to a ski-station.
One ski-station can have multiple properties.
I need to list all the ski-stations that have at least 1 property with the state "for sale". If a ski-station has 2 sold properties, it can not appear.
How can I achieve that ?

Many thanks.

#2658393

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

There are multiple ways - we can do this either by using the view's hook "wpv_filter_query" or using the "wpv_filter_query_post_process":
- https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
- https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query_post_process

Here is the related ticket that might help you:
- https://toolset.com/forums/topic/only-display-parent-posts-that-have-children-with-a-custom-field-value/page/2/#post-2013295

if you need further assistance, please share problem URL where you want to display your view and tell me what posts should be included.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.