This video provides a brief overview of loop elements in Breakdance, detailing how to effectively utilize them to display various types of posts on your website. 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.
Breakdance includes multiple types of loop elements, each with their own use-cases and advantages.
The Post List element is the most fundamental loop element in Breakdance. It offers an attractive and customizable list of your posts.
This element is ideal for quickly creating visually appealing loops without heavy customization, though customization options are available.
The Post Loop Builder element operates similarly to the Post Loop element, but offers more extensive customization by way of Global Blocks.
Instead of having a fixed card or list layout that you manipulate, the Post Loop Element allows you to use a Global Block as the repeated “template” that displays each post’s data. This is done by creating a Global Block using Dynamic Data and selecting it in the Post Loop Builder element.
The Products List element functions similarly to the Post List element, tailored for WooCommerce products, showcasing the versatility of loop elements for different post 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.
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.
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.
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.
Breakdance’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.
By enabling the “Filter Bar” option, Breakdance 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.
These features underline Breakdance’s flexibility and power in creating dynamic, engaging post displays on your website. This article has shown how to leverage loop elements to customize and enhance your website’s content presentation.