Help Center

Relationships

This guide covers the process of leveraging Advanced Custom Fields (ACF) Relationship Fields within Loop elements in Oxygen. This feature enables the dynamic display of content based on specified relationships in ACF.

Before starting, we recommend having ACF installed, and an ACF Relationship Field with relationships already created and populated.

Using ACF Relationships in Queries

  1. Select the loop element, such as the Post Loop Builder element.
  2. Open the Query controls and select Custom Query.
  3. Click the Edit Query button.
  4. In the Source drop-down, choose “ACF relationship”.
  5. From the Field drop-down, select the specific ACF relationship field you wish to use for filtering the posts.
  6. Click Apply Query to update the loop element with posts related through the selected ACF relationship field.

After applying the query, the loop element will dynamically display posts that are related through the specified ACF relationship field. Changing the relationships within ACF will automatically update the displayed posts in Oxygen.

Limitations

The ACF relationship field for custom queries does not support pagination. If you must use pagination, you will need to create an array query to return the IDs of the posts and the post type.