Help Center

Term Loop Builder

The Term Loop Builder is a versatile element designed to display loops of WordPress terms, enabling you to showcase categories, tags, or any custom taxonomy in your designs. Each item in the loop is displayed through a Component designed using Oxygen’s dynamic data features to display relevant term information.

Implementing the Term Loop Builder

Before adding the Term Loop Builder element, first create a Component to serve as the template for each term.

Adding the Term Loop Builder Element

  1. Open the page where you want to display the Term Loop Builder in Oxygen.
  2. Add the Term Loop Builder element to the page.
  3. Select the Component created earlier to use as the template for each term in the loop.

Configuring the Term Loop Query

The Term Loop Builder uses either a custom query specified through settings available in the Query section. When the “Load Terms By Query” setting is enabled, this allows you to use an Array Query that will accept WP_Term_Query arguments.

When adding code within the Term Query, you can use the global variable $breakdance_current_term to get the current Term within the query. This is useful when you would like to use a Post Loop Builder inside of a Term Loop Builder.

Some example queries may be found below:

Customizing the Display Layout

Once you’ve set the Component and defined the query, you can customize the layout for displaying terms on the page.

Choosing the Layout

In the List section of the Design Tab, select the layout for the Term Loop Builder from these options:

  • List: Display terms in a single-column list.
  • Grid: Display terms in a grid with one or more terms per row.
  • Slider: Use a slider to display the terms.

Each layout offers additional settings for further customization.

Styling the Term Loop Builder

The Post Section allows you to choose background color, borders, and paddings for each term. To modify the layout of each term, edit the selected Global Block.

The Container Section provides options for setting the overall styles for the container that holds all the terms.

Using Pagination

The Term Loop Builder includes several pagination options.