Skip Navigation

[Résolu] how to make type render field have parent ID in php

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 Il y a 7 années et 6 mois. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

Marqué : 

This topic contains 11 réponses, has 3 voix.

Last updated by Mohammed Il y a 7 années et 3 mois.

Assisted by: Mohammed.

Auteur
Publications
#433440

<?php echo( types_render_field("case-description", $band)) ?>

I am trying to: render a field based on the parent id in php..

Thanks

#433730

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.

#433834

Thanks for looking into my problem. I really need that to be sorted out.. Will wait for your response.

#434166

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.

#434168

Hi is there any Estimate of time we can expect their response.

Thanks

#434197

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.

#434204

Thanks.

#434601

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.

#435193

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?

#440779

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,

#440979

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.

#462697

Hi Laura,

This is fixed in the current Types release . please check if it's fixed or you need more help.

Thanks.

Le forum ‘Types Community Support’ est fermé à de nouveaux sujets et réponses.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.