Skip Navigation

[Résolu] Display dynamicly an image from a connected custom post

This support ticket is created Il y a 4 mois et 1 semaine. 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
- 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)

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

Dernière mise à jour par Minesh Il y a 4 mois et 1 semaine.

Assisté par: Minesh.

Auteur
Publications
#2706906
Capture d’écran 2024-07-08 210138.png

I have two custom post types, one for churches and one for pastors. In the church creation form, I have a custom field linked to pastors where I can choose the pastor associated with the church. There is no relationship set up, but the link to pastor was available in the custom field.

On the church page, I want to display the photo and name of the pastor. However, I can't get it to work; I'm using Views. I can display information from the church's custom fields, but how do I get those from the linked pastor?

#2707007

Hello ?

#2707106

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Here is the Doc that shows how you can display the post reference field using Toolset Block:
- https://toolset.com/course-lesson/using-post-reference-field-to-set-up-one-to-many-relationships/#displaying-fields-that-belong-to-the-related-post

If you want to display it using the legacy view and shortcode, please check the following Doc:
- https://toolset.com/documentation/legacy-features/views-plugin/using-post-reference-fields-to-display-information-from-a-related-post/#displaying-fields-that-belong-to-the-related-post

#2707161

Thanks a lot, using the short codes is the easiest way to do that 🙂