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:
return [
'taxonomy' => 'post_tag',
'object_ids' => get_queried_object_id(),
];
global $breakdance_current_term;
$term_id = $breakdance_current_term->term_id;
return [
'post_type' => 'product',
'posts_per_page' => '4',
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'terms' => $term_id,
)
)
];
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 ‘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.