Skip Navigation

[Resolved] child link forms & displaying custom field values from parent post

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

Last updated by julieP 6 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#631386

I have a site under development. One of the CPT's is set up as a child of one other CPT. I'm suddenly experiencing two issues:-

1. when I try to add a child link shortcode to a CT, the page containing the form (which contains the parent selector) can't be found. If I add the shortcode manually, the user can see the form on the frontend and it works as it should.

2. Until now I've used this format to display the value of custom field 'final-choice' from the parent post type 'owner':-

[types field='final-choice' id='$owner'][/types]

and follows your documentation here: https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/

but all of a sudden it's not working. After a search in the forum, I came across a thread from Feb this year showing a different format:-

[types field='final-choice' id='[wpv-post-field name="_wpcf_belongs_owner_id"]'][/types]

and this works.

I didn't think any of the upcoming changes to the way post relationships will work had been implemented yet or have I missed something? Is there an explanation as to why I suddenly have these issues? If the behaviour under point 1 isn't expected, what can I check/try to ascertain the cause please?

#631503

1. when I try to add a child link shortcode to a CT, the page containing the form (which contains the parent selector) can't be found.
https://toolset.com/errata/autocomplete-not-work-adding-link-create-child-or-delete/

2. can you share the link to the thread where you found that code.
It seems to be a workaround, as that still addresses the old relationship fields.

The code that "works" for you just calls the proper field directly by post meta, instead of with our $parent syntax.
but I am not aware that this is broken.

Maybe we can learn more if you share that thread?

#631762

Hi Beda

1. thanks for this (I wouldn't have recognised this issue from the errata title !)

2. I found the code in this thread (Luo Yang's entry # 615562 at 10.12 on feb 13 2018) https://toolset.com/forums/topic/cannot-output-parent-field-in-cred-child-post-using-cred-post-parent-getid/

#631951

Minesh
Supporter

Languages: English (English )

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

Well - I just checked and I see the parent field value correctly displayed when I add parent field shortcode on child post editor.

Where exactly you have added the parent shortcode?

#634286

Hi Minesh

I've shown this in my opening thread

#638865

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Julie

Just a quick note to say Minesh is sick today. He should hopefully be back tomorrow, but if not I'll step in.

#641660

Minesh
Supporter

Languages: English (English )

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

Yes - I've followed the same way to display the parent custom field value and its working for me.

Could you please share debug information as well as problem URL where I can see the issue?

*** 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.

#690950

Hi

For some reason I didn't get the last two responses in this thread (?). In the meantime, I've tested this on a vanilla site and it's OK so I think there's something awry my end where I first had the issue. If I need to I'll come back to you. Thanks for your help.