Loop Elements
The term “loop” refers to the method of showing a list of posts, which includes not just blog posts but also pages, WooCommerce products, and custom post types.
Types of Loop Elements
Oxygen includes several types of loop elements, each with their own use-cases and advantages.
Post Loop Builder
The Post Loop Builder element offers extensive customization by way of Components. The Post Loop Element allows you to use a Component as the repeated “template” that displays each post’s data.
Term Loop Builder
The Term Loop Builder element allows you to dynamically fetch and display a list of taxonomies.
Loop Query Types
For a Loop to show posts, it must have a query. A query is a set of rules that tell the database which posts to return. This allows you to fetch the specific posts you require in a given scenario.
Custom
The Custom query type allows you to use a visual builder to tailor your query to your needs. You can select specific post types, use ACF relationship fields, create meta queries, and more – all with no code.
Text
The Text query type allows you to use a traditional WordPress query string to fetch specific posts from the database. This is more advanced, but can be useful in some cases.
Array
The Array query type allows you to build your WP_Query arguments with PHP. This enables more advanced options like passing PHP variables into your query arguments.
Other Features
Pagination
Oxygen’s loop elements offer different pagination options, from traditional numbers and text to “load more” buttons and infinite scrolling. These can be selected and modified in the Pagination section of the loop element’s Properties panel.
Isotope Filtering
By enabling the “Filter Bar” option, Oxygen will apply visual Isotope filtering to your loop. This allows users to select from different criteria and see the loop visually filtered to match their selection.