Loop query

The following query parameters can be used for all loop types.

Limit item count

Use the count attribute to limit the total number of items.

Recent posts:
<Loop type=post count=3>
  <a href="{Field url}"><Field title /></a>
  <If not last>, </If>

Filter by field

Use the field attribute to filter items by field.

  • field - Field name by which to filter
  • field_value - Field value
  • field_compare - Comparison operator - See If tag: Common comparisons
  • field_type - Field type: string (default), number, date

Filter by multiple fields

For the field attributes, add the suffix _2 and _3 to filter by more than one field.

  • field_2, field_value_2, field_compare_2, field_type_2
  • field_3, field_value_3, ...

Sort by field

Use the sort_field attribute to sort items by field.

  • sort_field - Field by which to sort
  • sort_order - Sort order - asc for ascending (default), or desc for descending
  • sort_type - Sort type - string (default), number, date