Advanced Filter

The advanced filter allows complex rules to be made on any attribute.

The filter string can contain multiple filter condition sets separated by “||” (which acts as an OR operator), and each condition set can contain multiple conditions separated by “&&” (which acts as an AND operator). Each condition in the filter can follow the format “field:operator:value”.

Depending on the operator, it compares the item value with the filter value:

  • eq: checks for exact equality.
  • not: checks for negative match.
  • regex: checks if the item value matches the regular expression pattern in value.

Simple equality:
“address.city:eq:London”

Negative match:
“address.city:not:Paris”

Regular expression matching:
“tickets.display_name:regex:^.*Seminar$”

Compound filters using AND (&&) and OR (||) logic:
“address.city:eq:London && venue.name:not:Albert Hall”
“venue.name:eq:Windsor Castle || venue.name:eq:Buckingham Palace”

To use the advanced filter in the shortcode use filter_by_attr e.g. filter_by_attr=”venue.name:eq:Windsor Castle || venue.name:eq:Buckingham Palace” or use the appropriate form input area.

For data attributes and structure see this article

Was this helpful?