Relationship-driven loops
Why relationships matter
Relationship-driven loops describe how Divi Loop Extender identifies and connects content based on existing links between posts, users, or terms.
These relationships act as contextual signals, allowing a loop to render data related to the current post or viewing user instead of relying on static filters or categories.
Each relationship type represents a different way of defining “relatedness.” Some are structural (like categories or taxonomies), while others are data-driven (like ACF fields or user references). Together, they provide a framework for creating intelligent, connected layouts across your site.
The idea behind relationship data
In WordPress, relationships define how one piece of content relates to another be it conceptually, structurally, or contextually.
Divi Loop Extender interprets these connections so the Loop Element can automatically show related data, such as:
- Posts from the same taxonomy or term.
- Entries sharing a matching field value.
- Objects explicitly linked through custom fields.
- Content owned or created by the current user.
Instead of writing queries manually, you define the logic of connection, and Divi Loop Extender translates that logic into a working data relationship for your loop.
Common relationship types
Relationships can vary in complexity depending on how the data connects. Divi Loop Extender supports all major relationship structures used in WordPress and custom fields.
Relationship type | Description | Example use |
---|---|---|
One-to-one | A single post links to one other post. | A “Speaker” post links to a single “Event.” |
One-to-many | One post links to several related posts. | A “Course” links to multiple “Lesson” posts. |
Many-to-many | Multiple posts reference each other. | “Authors” linked to multiple “Books,” and each book linked back to its authors. |
When you enable relationship-driven loops, Divi Loop Extender queries the linked post IDs and automatically populates the Loop Element with the related items.
This makes it possible to reuse the same layout for any context. For example, displaying the speakers of an event or the projects belonging to a portfolio category.
Relationship models in Divi Loop Extender
The relationship types available within Loop Extender reflect the most common ways content can be connected in WordPress.
Relationship model | Conceptual basis | Typical data source |
---|---|---|
Category and tag relationships | Connect content through shared taxonomy terms. | Built-in WordPress categories and tags. |
Custom taxonomy relationships | Represent domain-specific classifications. | Custom post types and registered taxonomies. |
Field-based relationships | Define direct post-to-post connections using stored IDs. | ACF relationship fields. |
ACF Field match relationships | Relate items that share the same field value. | ACF text, number, or select fields. |
User-based relationships | Connect content with its creator or assigned user. | Post authors or user reference fields. |
Each model expresses a different layer of association:
- Taxonomies represent implicit relationships inferred from shared categories or tags.
- Field-based and field match relationships express explicit editorial or data-driven connections.
- User-based relationships adapt dynamically to user context.
Taxonomy relationships
Taxonomies such as categories, tags, and custom terms describe content hierarchically or thematically.
When Loop Extender uses taxonomy-based relationships, it interprets shared term IDs as the connection between posts.
This model is ideal for contextual similarity like posts grouped by subject, type, or purpose.
Conceptually, taxonomy relationships represent implicit relatedness: they exist because of classification rather than direct linking.
Examples:
- Two blog posts sharing the same category.
- Portfolio items tagged under the same “Project Type.”
Field-based relationships
Field-based relationships express explicit connections where one object directly references another through stored post IDs.
They are common in frameworks like Advanced Custom Fields (ACF) or other custom field plugins like Pods, where editors can link posts manually using “Relationship” or “Post Object” fields.
Loop Extender reads those stored IDs to retrieve the corresponding posts dynamically, providing complete editorial control over related content.
Examples:
- A project post referencing related case studies.
- An event post linking to a featured speaker.
Field match relationships
Field match relationships are based on shared values rather than direct references.
Instead of linking posts by ID, both items contain a field. For example, brand_id
or location
with the same stored value.
Loop Extender interprets this common value as the connection key.
This model represents equivalence-based relationships: the posts are not directly linked, but they are conceptually related through shared attributes.
Examples:
- Products sharing the same brand.
- Articles tagged by identical ACF “topic” values.
User-based relationships
User-based relationships connect posts with their associated users.
The connection can be established through authorship (the post’s author) or a user reference field stored in post meta.
This relationship type is contextual as it adapts based on who is viewing the page.
Examples:
- Displaying posts authored by the logged-in user.
- Showing “My submissions” or “My listings” in user dashboards.
- Linking client posts to their assigned account managers.
Integrating relationship logic into design
Relationship-driven loops make Divi layouts adaptive and intelligent.
They allow the same module or layout to automatically surface relevant information without manual duplication.
Conceptual examples:
- A project template that always displays its related case studies.
- A course layout that lists the lessons defined by its ACF relationship field.
- A user profile that pulls the current user’s assigned content.
These loops don’t change your design structure—they enrich it with contextual awareness derived from relationship data.