Skip Navigation

[Resolved] Displaying a field value in a related custom post type view

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

Problem:

Display post information in Repeatable field groups loop.

Solution:

Toolset Repeatable field groups are based on one-to-many relationship, the relationship slug is Repeatable field group slug, so each item of RFG is also a post, in the item of RFG you can display it's parent post information using types shortcode + "item" attribute, for example:

[types field="walk-in-interview" item="@RFG-SLUG.parent"][/types]

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/

This support ticket is created 4 years, 4 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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by deepS 4 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1688939
Screenshot_1.jpg

There are two types of custom posts: Companies and Jobs (they are related in one to many way). I often display field values of one in another.
There is a custom field in Jobs called 'Walk-in-Interview' (radio button) in Job post type. It shows whether the job is a walk-in-interview or not.
There is another view called 'Company Job vacancies' created to show the jobs available under the current company and it picks up the RFG values from job posts.
Now what I want to do is to display the walk-in-interview tags (from Job posts) against those vacancies (generated by Company Job Vacancies)
For understanding the things, please see the following URLs:
(job post) hidden link
(company post) hidden link

I am ready to share login information for the purpose.

#1689545

Hello,

Toolset Repeatable field groups are based on one-to-many relationship, the relationship slug is Repeatable field group slug, so each item of RFG is also a post, in the item of RFG you can display it's parent post information using types shortcode + "item" attribute, for example:

[types field="walk-in-interview" item="@RFG-SLUG.parent"][/types]

Please replace walk-in-interview with your "walk-in-interview" field slug, replace RFG-SLUG with Repeatable field group slug

More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/

I have enabled the private message box, in case you need more assistance for it.

#1689693

My issue is resolved now. Thank you!