Skip Navigation

[Resolved] How to show related records?

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

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by geertV-3 2 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2186209

I have organizations (organisaties) and I have jobs/vacancies (vacatures)
If an organization have 1 or more jobs I want to show the jobs on there page.
this is an example of an organization page :hidden link

for this organization I have 4 jobs/vacancies (vacatures) that I will show on the page.

if there are no jobs/vacancies, I don't want to show anything

Thank you very much

#2186653

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

The view "Toon_vacatures¨van_huidige_organisatie" is set to show the jobs, related to the organization post, whose ID is provided in the shortcode attribute.

In your template for jobs "Template for Vacature", this view's shortcode is being used with the related parent organization post's ID, passed in the shortcode attribute "related":


{!{wpv-view name='toon_vacaturesvan_huidige_organisatie' related="{!{wpv-post-id item='@organisatie.parent'}!}"}!}

The same view can be used in the template for organization "Template for Organisaties 2", but, this time the current organization post's ID will need to be passed in the shortcode attribute "related":


{!{wpv-view name='toon_vacaturesvan_huidige_organisatie' related="{!{wpv-post-id}!}"}!}

You'll see that the related job posts are showing on the organization post now.
( screenshot: hidden link )

regards,
Waqar

#2186713

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.