Array Query

Utilizing the Array Query in Breakdance Loop Elements

This article briefly explains the process of using the array query feature within loop elements to create advanced content queries. This method leverages PHP for dynamic content display customization.

You can learn more about PHP queries in WordPress via the WordPress Developer Document for WP_Query

Setting Up Your Loop Element

Adding a Loop Element to Your Page

  1. Begin by adding a loop element to your page, such as the post loop builder or the post list element.
  2. Navigate to the query option in the properties panel of your selected loop element.
  3. Select “Array” query option and then click the expand icon to open up the query editor.

Creating Advanced Queries with Array Query

Using the PHP Editor for Custom Queries

Click the expand icon to open the PHP editor. Within the editor, you can enter PHP functions, custom code, or utilize WordPress classes to craft your query. This powerful feature allows for a wide range of query customizations beyond standard options.

Handling Errors in Your Query

If you encounter a 500 error when using the query editor, this typically indicates a syntax or logical error within your PHP query. Review and correct the query to resolve the issue and refresh the query to see the corrected output.

Additional Notes

The array query feature in Breakdance offers an advanced method for customizing the content displayed within loop elements. By directly manipulating query parameters through PHP, users can achieve highly tailored content displays that meet specific site requirements. Always ensure to double-check your PHP syntax and logic to prevent errors and ensure smooth functionality.