Home›Types Community Support›[Resolved] I'm calling all the child and making them use their parent Id to view the data
[Resolved] I'm calling all the child and making them use their parent Id to view the data
The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
I am trying to: call them at a one place instead of doing for each separately, I'll attached a screenshot of all three child relation code.
I wanted to get them sorted by published which is being impossible at the moment. If I can call all the child relation at the same time then it will be easy to sort them by published date
case PT is realted to Case Order PT and Notice of hearing PT
in the code screen shot I'm using Case Order and Case relation PT which is case-order-rel
exact same thing with Notice of hearing
Everything works fine it's just I need to make them sorted by published date and if people will choose more than one relation for each post type only the latest should come at the top.
You can actually retrieve them from the database by using the WP_Query function.
The parent information is actually stored in a hidden custom field call "_wpcf_belongs_{cpt-slug}_id" . This custom field actually stores the id of the parent post. So you can actually query the database directly for the items you want https://codex.wordpress.org/Class_Reference/WP_Query
Please let me know if this helps.
Thanks,
Shane
The forum ‘Types Community Support’ is closed to new topics and replies.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.