Skip Navigation

[Resolved] Display dynamicly an image from a connected custom post

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
- 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)

This topic contains 2 replies, has 2 voices.

Last updated by Minesh 5 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#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

Languages: English (English )

Timezone: 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 🙂