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 Global Block designed using Breakdance’s dynamic data features to display relevant term information.
Before adding the Term Loop Builder element, first create a Global Block to serve as the template for each term.
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:
Once you’ve set the Global Block and defined the query, you can customize the layout for displaying terms on the page.
In the List section of the Design Tab, select the layout for the Term Loop Builder from these options:
Each layout offers additional settings for further customization.
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.
The Term Loop Builder includes several pagination options. Learn more about pagination here.
The ‘Repeated Block’ section allows you to choose a global block, define the HTML tag for the block, and access advanced settings like alternate block settings, static items, and their respective configurations.
In the ‘Query’ section, you can define the criteria for selecting the terms that will be displayed in your block.
The ‘Pagination’ section allows you to add and customize pagination for your content, including style, text for previous/next buttons, and options for ‘Load More’ functionality. Learn more about Pagination.
The ‘List’ section focuses on customizing the appearance of lists in your layout. Adjust the width, layout type, and delve into specific settings for sliders, including effects, autoplay, and navigation options.
The ‘Post’ section is dedicated to styling individual terms. Customize their background, borders, and padding to match your site’s design aesthetic.
In the ‘Container’ section, you can customize the overall container of your element, including its background, borders, and padding, to create a distinct look and feel.
The ‘Spacing’ section provides controls to adjust the margin at the top and bottom of the element, allowing for precise spacing and alignment within your page layout.