Display fields from a related post (Pro)

With this feature you can display fields of a Post that is selected in a relationship or post_object field, near the current post fields.
For example:
Let’s imagine there are Company and Employee CPTs. Every Employee item has a post_object field that contains the Company where the Employee works.
You’ve created a View for Employees. Using this feature you can display Company fields directly within the Employee View.
This means you can ‘pull’ any fields from the related post in your current View.

Step by step

Let’s say that we call a View the ‘Main View’, which apart from its own fields will also display fields from the related post. The ‘Related Post’ is called a Post, which is selected in the relationship/post_object field, these fields will be displayed within the 'Main View'.
  1. 1.
    Decide which fields from the Related Post you want to display, then create a View for it.
  2. 2.
    Create (or open) the 'Main View' and choose the relationship/post_object field. In the ‘ACF View’ setting for this field choose the Related View (which we created in the first step)
  3. 3.
    Paste the shortcode of the 'Main View' in the target place and ensure the relationship/post_object field is filled.
  4. 4.
    That’s it, you’re done.
Last modified 8d ago