Skip to main content

Title Leveraging Loops & Logic

When you’re building layouts exclusively with HTML, you need a reliable way to query post data from your WordPress database: to build loops and populate templates with post-specific data.

In other page-builders, this is typically done with a ‘posts block’ or ‘query loop:’ devices which have the same UI shortcomings as other no-code abstractions.

Enter Loops & Logic

Though it was tempting to build a custom syntax for querying WordPress data in Aviator’s HTML editor, the bright minds at Tangible had already solved that problem with their free plugin: Loops & Logic.

A cartoon duck explaining L&L syntax on a chalkboard.
Don’t be fooled by the cartoon, L & L is duckin’ powerful.

Loops & Logic provides a capable, intuitive syntax for grabbing anything you need from the backend—whether you need a complete posts loop:

<!-- get all Posts... -->
<Loop type=post>
  <!-- ...and print the title for each post. -->
  <Field title />
</Loop>
<!-- get all Posts... -->
<Loop type=post> 
  <!-- ...and print the title for each post. -->
  <Field title />
</Loop>

On this page