Text Query

Utilizing Text Query in Loop Elements with Breakdance

This document demonstrates how to effectively use the text query feature within loop elements, such as the post loop builder or post list element, to customize content display based on specific criteria.

Adding a Loop Element to Your Page

Getting Started with Text Query

  1. Add a loop element to your page. This can be either the post loop builder or the post list element depending on your needs.
  2. Once the element is in place, navigate to the query options within the properties panel and select “Text” query option to access the available options.
  3. The text query allows you to enter parameters similar to those used in the WordPress REST API arguments page. This means you can customize your query using the same arguments recognized by the WordPress REST API. You can see a list of post arguments on this WordPress developer page.

Customizing Your Query

Adjusting Post Type and Adding Parameters

  1. Change the post type within the text query to target a specific custom post type.
  2. Upon specifying the post type, all posts associated with it will be displayed. To further refine your query, you can add additional parameters.
  3. Add parameters by including an ampersand (&) followed by the arguments you wish to apply. These arguments can be any recognized by the WordPress REST API.

Example of Adding Parameters

To add parameters to your query, simply append them to the text query field in the format: &argument=value. This allows for extensive customization of the content displayed by the loop element.

Additional Notes

This feature provides a powerful way to dynamically control the content displayed within Breakdance’s loop elements, offering flexibility to match specific project requirements. For a comprehensive list of available arguments, refer to the WordPress REST API documentation. A link to this documentation will also be included in Breakdance’s documentation for easy reference.