Skip to content

Custom fields - setting search logic

Choose whether a Listivo taxonomy field makes a listing match every filter a visitor ticks, or any one of them — and see what each setting does to the search results.

1 minute read

Taxonomy fields only
Search Logic can only be set on a custom field whose type is Taxonomy.

Create the field and set its search logic

  1. 1 Add a new custom field

    In the WordPress admin, go to Listivo Panel → Custom Fields and click Add New Field.

    WordPress admin with the Listivo Panel menu open on Custom Fields; arrows point to Custom Fields in the sidebar and to the Add New Field button above the list of fields.
  2. 2 Name the field and set the type

    Write down your field name and set Type to Taxonomy, then click Add Field.

    The Add New Field form: a Name box containing "Your Field Name", a Type dropdown set to Taxonomy, and the Add Field button, all highlighted.
  3. 3 Open the field for editing

    Find your new field in the custom fields list and click Edit next to it.

    The Custom Fields list with Category, Price, Bedrooms and Bathrooms rows; an arrow points to the Edit button on the Category row.
  4. 4 Set the search logic

    In the field settings, set Search Logic to AND or OR.

    The Edit Field screen for a field named Contract Type, with the Search Logic dropdown open showing the options AND and OR, next to the Allow Multiple Values row.

How AND behaves

With AND, a listing has to meet all the selected criteria at the same time. In the example below the custom field Features has its search logic set to AND, and with three features ticked only one car meets all the requirements.

The Features filter in the search sidebar with 360-degree camera (1), ABS (1) and Backup camera (1) ticked, and Active head restraints and Bluetooth left unticked.
Search results reading "1 Results" with the filter chips Car, 360-degree camera, ABS and Backup camera, and a single Lamborghini listing below.

How OR behaves

With OR, a listing only has to meet one of the selected criteria, so a visitor can pick more than one value and widen the results. In the example below the custom field Transmission has its search logic set to OR: you will see cars with automatic (8 cars) and manual (7) transmissions.

The Transmission filter with Automatic (8) and Manual (7) ticked and highlighted, and Semi-Automatic (4) left unticked.
Search results reading "15 Results" with the filter chips Car, Automatic and Manual, listing a Mercedes-Benz G, a Ford Focus SE and an Audi A6.

Ask the people who build Listivo

We answer by email from support@tangiblewp.com. With Premium Support, we also fix your site when something breaks.

Was this guide helpful?