[Gelöst] get all the varies post type children post of a parent based on parent id
This support ticket is created vor 3 Jahren, 4 Monaten. 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.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
a 'Plan" have multiple children from a few CPT's
e.g. a plan is a parent of budget, net worth and other custom post types
as far as I understand the current toolset_get_related_posts require a relationship to be declared. i understand that only one relationship can be called out.
is there a way to get all the children of the parent across multiple relationships
i.e plan_budget and plan_net and plan_target etc..
If you can share admin access details and tell me where you added the code I'm happy to review it.
*** 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.
I checked and I found that you are using the one-to-one post relationship.
So, rather making things complicated, you can use the Toolset post relationship API function: toolset_get_related_post() to get the related child post for every relationship you have.
The variable $related_assumption and $related_budget will hold the child post ID. You should get the post based on the found ID and display the content as required.
In your case its different. You have assumption and budget set as child. That is why we will have to use toolset_get_related_post() or toolset_get_related_posts().