Pods Relationship Field in Bricks

CleanShot-2022-11-04-at-18.51.50@2x

In this Pro tutorial, we explore the Relationship field of Pods and share ways to output items of a related post type incl. the associated custom field's value in Bricks.

Custom Post Types: company and job.

Field for company CPT: company_location (Type: Plain Text).

Single Select

Field for job CPT: related_company (Type: Relationship)

Objective: On the job CPT's singular pages, show the related company data like the title, the location custom field's value and the content.

Create and edit "Single Job" template with Bricks.

Set a template condition to ensure that it applies to singular items of the job post type.

Add a Section having the Post Title and Post Content elements.

Add another Section having a "Related Company" heading.

Below the heading, add a Posts element or a Query Loop to output posts of the company post type.

Add Post Title, Basic Text and Post Content elements (query loop was used in our test site).

Change the Basic Text element's text to:

This is a Pro members-only tutorial.

To get full access, login below or sign up for a Pro Account

Leave the first comment