Skip Navigation

[Résolu] Get and Display Metadata from Relationship into The Grid Skin Builder

Ce fil est résolu. Voici une description du problème et la solution proposée.

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

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Nigel Il y a 5 années et 11 mois.

Assisté par: Nigel.

Auteur
Publications
#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 : lien caché

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

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: 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

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: 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.