Skip Navigation

[Resolved] Grand parent title in a grand child form mirror field

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Miguel 2 years ago.

Assisted by: Luo Yang.

Author
Posts
#2542611

Tell us what you are trying to do?
I have the CPT "courses", "editions" and "registrations"
Courses << Editions << Registration

I added a form for Registration where I'm mirroring parent fields (Editions) into similar fields in Registration CPT fields.
I wanted to mirror a grand parent title field (Courses) into another Registration field.

The slugs for relatonships are:
course-edition
and
edition-registration

My attempts were using shortcodes like this:
[types field="wpv-post-title" item="@{course-edition}.parent "]
[types field="wpv-post-title" item="@{edition-registration}.parent "]

but none worked...

Is there any documentation that you are following?
https://toolset.com/forums/topic/create-a-post-with-form-on-a-parent-post/
https://toolset.com/forums/topic/grand-parent-field-accesing/

Is there a similar example that we can see?

What is the link to your site?
it's a local site

#2543911

Hello,

It needs a content template, for example:
1) Create a content template "parent-edition-info", display it's grand-parent "course" post information:
[wpv-post-title item="@{course-edition}.parent"]

2) In the single child "Registration" post, you can display above content template shortcode, like this:
[wpv-post-body item="@{edition-registration}.parent" view_template="parent-edition-info"]

It should be able to display it's grand-parent "course" post title.

#2544889

Because it was a form, I did this:
For CPT "inscriptos" I created mirror fields with the same names and the prefix "E" (E for Espejo, mirror in spanish). For example the mirror name for the field

fecha-inicio

I created the mirroring field

e-fecha-inicio

For Grand Parent title post, I use this shortcode in the value:

 [wpv-post-title item='@curso-fecha.parent']

For Parent title:

 [wpv-post-title]

For custom fields:

 [types field='modalidad'][/types]

I did all this to be able to export all the information to a single spreadsheet.
I will export it using WP All Export

I am really grateful for all the help I have received!
Thanks