Skip Navigation

[Resolved] Query child posts by a value in the child

This support ticket is created 6 years, 4 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
- 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 6 replies, has 2 voices.

Last updated by Minesh 6 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#1122383

I have a 1 to many relationship.
Venue (parent - one) to Concert (child - many)
I have the parent (venue) ID and I want return a list all related child posts that have a custom field (wpcf-concert-in-past) value of zero. the code below returns no results. if I make the query array blank it returns all the child posts.
These are all made with the new (3.0) version of types.

$currentconcertsforvenue = toolset_get_related_posts(
$venueId,
'venue-concert',
'parent',
100,
0,
array(
'meta_key' => 'wpcf-concert-in-past',
'meta_compare' => '=',
'meta_value' => '0'
),
'post_id',
'child',
'title',
'ASC',
true,
$finalcount
);

#1122701

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - Toolset Types current version is 3.1.1, could you please make sure you are using latest Toolset plugins.

We always recommend running your site with latest stable release plugin version.

*** Please make a FULL BACKUP of your database and website.***
Could you please check and update ALL Toolset plugins to it's latest official released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/

We issue the hotfix but it should be already fixed with Types version 3.1.X.
=> hidden link

#1122777

Hi, yes my plugins are up to date and the hotfix file is identical to the one on the site.

#1123341

Minesh
Supporter

Languages: English (English )

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

Well - could you please share problem URL where you are using the said function to get related posts as well as access details?

*** 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

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

#1124534

Minesh
Supporter

Languages: English (English )

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

well - I try to check on my local test install and I see the issue for now.

Please allow me to report this to our next level support. I'll get in touch with you as soon as possible once I know more.

#1134949

Minesh
Supporter

Languages: English (English )

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

This issue will be fixed with the next release of Types version 3.2 which is set to be entered to QA next week.

#1155393

Minesh
Supporter

Languages: English (English )

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

We just release new set of Toolset plugin. Could you please update Types plugin to it's latest official releaed version 3.2 and try to resolve your issue.