<?php echo( types_render_field("case-description", $band)) ?>
I am trying to: render a field based on the parent id in php..
Thanks
Hi Laura,
Thank you for contacting Toolset support.
I’m Mohammed: the Toolset support team leader. I’ll give my best to help you to achieve your needs through Toolset components.
I'm trying to make this work but it seems that something is wrong here. please let me consult one of the developers and get back to you again.
Thanks.
Thanks for looking into my problem. I really need that to be sorted out.. Will wait for your response.
Hi Laura,
After checking this with a developer, I can confirm that we have an issue regarding displaying fields of parent posts.
I've reported this directly to the development team so that they can solve quickly.
Please keep following here and I will notify you once I get any updates.
Thanks.
Hi is there any Estimate of time we can expect their response.
Thanks
Hi Laura,
They already worked on the issue and we are discussing it.
Issues like this take high priority and are being handled ASAP but I can't promise you when the issue can be solved.
Anyway, I will notify you once I get any updates.
Thanks.
Hi Laura,
I wanted to update you that we are doing a refactoring process on how we handle the posts relationships in our plugins.
This issue will be included in this refactor process.
The refactoring process will fix a lot of issues and it's in progress now.
Please keep following here and I will notify you once I get any other updates.
Thanks.
Hello
Please correct me if I am wrong, but I understand you want to display a Field of a parent Post (Set by Types Plugin) when you view a Child Post.
With PHP this has to be done like this below example:
echo types_render_field( 'parent-single-line' , array('post_id'=>'$toolset-parent' ));
parent-single-line is the Field Slug that I store for the Parent Post Type, and $toolset-parent is the slug of my Parent Post Type.
As you see we do not use "id" here but "post_id"
"id" can hold a numeric, single Post ID.
"post_id" can hold Numeric Values, $parent (for WordPress pages relations), and $parent_post_type_slug (for types relations)
Can you confirm with the above correct Syntax the issue is solved for you too?
Hi Laura,
This is an update that our development team is aware of this issue and they already are working on it
Please keep following this ticket and I will get back to you once I get any updates.
Thanks,
Hi Laura,
This is an update that this will be improved in the next Types release 2.3
It will be like the following:
echo types_render_field( 'parent-single-line' , array('id'=>'$toolset-parent' ));
For now, please use Beda's solution and I will notify you once we launch the new release.
Thanks.
Hi Laura,
This is fixed in the current Types release . please check if it's fixed or you need more help.
Thanks.