How to Display ACF Relationship Fields in Divi Query Builder Loops

Aug 28, 2025 | Tutorials | 0 comments

 

🔗 Displaying ACF Relationship Fields in Divi Query Builder

Posts, Users, Terms, and Links — Fully Dynamic with Divi Query Builder

ACF Relationship fields are essential for building relational content structures in WordPress. Whether you’re linking courses to instructors, products to categories, or team members to departments, Divi Query Builder makes it easy to display this data dynamically — no custom PHP required.

Let’s walk through how to use each supported field type and what kind of output Divi Query Builder can generate.


🧩 Supported ACF Field Types

Divi Query Builder supports the following ACF field types natively:

Field TypeReturnsDisplay in Query Builder
post_objectSingle post objectTitle (linked), Excerpt
relationshipArray of postsTitle (linked), Excerpt
userWP_User objectDisplay Name (linked), Bio
taxonomyTerm objectTerm Name (linked), Description
page_linkURL to a page/postAnchor tag with label
linkURL + labelAnchor tag with label

🔧 Step 1: Set Up ACF and Divi

Ensure the following are active:

  • Advanced Custom Fields Pro (for Relationship fields)
  • Divi Theme + Divi Query Builder

✍️ Step 2: Create Your Field Group

Go to Custom Fields > Add New and add one or more of the following:

  • post_object: Link a single post (e.g., featured article)
  • relationship: Link multiple posts (e.g., related products)
  • user: Link authors, team members, or clients
  • taxonomy: Link categories, tags, or custom terms
  • page_link: Link to internal pages
  • link: Link to external URLs with custom labels

Assign the field group to the relevant post type.


🌀 Step 3: Populate Your Fields

Edit a few posts and fill in the relationship fields with real data. For example:

  • On a “Course” post, select multiple “Instructor” users
  • On a “Product” post, link to related “Category” terms
  • On a “Team Member” post, add a page_link to their bio page

This creates the relational data that Divi Query Builder will display.


🧱 Step 4: Build Your Loop with Divi Query Builder

  1. Add the Divi Query Builder module to your layout.
  2. Set the Post Type to the one containing the relationship fields.
  3. Enable Show Custom Fields and add the relevant field tags.

Divi Query Builder automatically detects the field type and renders the appropriate output.


👀 Step 5: Save and Preview

Save your layout and preview the page. You’ll see each post dynamically displaying its related content — whether it’s linked posts, user bios, taxonomy terms, or external links.


🚀 Bonus Use Cases

  • Course Page: Show instructors (user field), related modules (relationship), and syllabus download (link field)
  • Team Directory: Display department (taxonomy), bio page (page_link), and LinkedIn profile (link)
  • Product Page: Show related products (relationship), category (taxonomy), and support contact (user)

0 Comments

Submit a Comment