Skip Navigation

[Resolved] Get and Display Metadata from Relationship into The Grid Skin Builder

This thread is resolved. Here is a description of the problem and solution.

Problem:
The Grid plugin has a feature where you can specify custom fields to be included in the output for posts shown in the grid.

How would it be possible to retrieve custom fields from a related post and output those?

Solution:
The Grid uses a bespoke method to retrieve the custom fields which is not filterable, and so there is no way to switch the source to a related post, it is not possible.

This support ticket is created 5 years, 11 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.

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 5 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1155241

Hi,

So I use The Grid Plugin to display a list of my post. This plugin offer a Skin Builder, in this builder I have an option to put text/html or metadata. My Goal is to display the title of the parent CPT (Section) related to the post who is displayed (This post is child of the cpt).

Normally to do that I use :

wpv-post-title item="@relationship-slug.parent"]

But this shortcode doesn't work in text/html or in metadata.

Here documentation about metadata in a skin builder : hidden link

So I think I need to retrieve the right metadata of my relationship and put the code in.

Can you help me find the right metadata ?

#1155381

Nigel
Supporter

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

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

Hi Marc

Looking at that documentation it seems pretty clear that what you want is simply not possible.

They obviously use their own bespoke way of retrieving the post meta, which doesn't allow for anything other than retrieving it directly from the current post.

The only way you might get it to work would be if they provided a filter for the get_post_meta call that they must be doing under the hood, so that you could alter the ID of the post the custom field should be retrieved from.

You would need to ask them if they have such a filter, or if there were any other way you could set the ID of the post that supplied the post meta to be any different than the current post.

If they can provide such a mechanism or filter, I could help you with the code to provide the correct ID.

#1161356

Ok thank you. Is not possible so I gonna find another solution.

Thank you for your awesome support.

#1162713

Nigel
Supporter

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

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

No problem. It would be worth contacting their support to ask if the call to get the post meta can be filtered.