Skip Navigation

[Gelöst] Grand parent field accesing

This support ticket is created vor 2 Jahre, 7 Monate. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 Antworten, has 2 Stimmen.

Last updated by marcB-6 vor 2 Jahre, 7 Monate.

Assisted by: Shane.

Author
Artikel
#2162799

Dear Support Team,

I want solution like i have one post type called module and module is related to journey post and journey post has relationship with location post i want related location field in module post type and module post type has relation ship with journey post type please suggest me solution.

Thanks

#2162907

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marc,

Thank you for getting in touch.

In order to do this you will need to create a classic view that is displaying the parent post type. So go to Toolset -> View and create a new view then select the parent post type.

Now on that view you will add a query filter for the Post ID and set it to be filtered by a shortcode attribute.

Next you will add the custom field shortcodes of the grandparent post type by adding them like this.

[types field="my-field" item="@{relationship-slug}.parent "] 

Where you will replace {relationship-slug} with the actual slug of the relationship between the Journey and Location. Given that it's the grandparent information.

Now just add this view to your child post template with the format.

[wpv-view name="my-view" ids="[wpv-post-id item='@{relationship-slug}.parent ']"]

Where ids is the shortcode parameter. Essentially you're passing the module's parent ID into the Journey view and using the Journey that is being filtered for to display its parent information.

Please let me know if this help.

Thanks,
Shane

#2163303

My issue is resolved now. Thank you!

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