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:

Negative match:

Regular expression matching:

Compound filters using AND (&&) and OR (||) logic:
“ && Hall”
“ Castle || Palace”

To use the advanced filter in the shortcode use filter_by_attrs e.g. filter_by_attrs=” Castle || Palace” or use the appropriate form input area.

For data attributes and structure see this article

Was this helpful?