Filter markers by custom fields


To add your custom fields as new filters, do the following:

Step 1: Adding a custom field

  1. Edit your map
  2. Open the widget “Progress Map Settings”, scroll down and click on the menu “Markers filter Settings”.
  3. Scroll down to the section “Filter fields”.
  4. Open the group field “Field 1” or click on the button “Add new field” if this is not your first custom field to add.

Step 2: Setting up the custom field parameters

  1. In the field “Field title”, enter the title of your custom field (e.g. “Price”). In the frontend, the title also allows to toggle the list of options.
  2. In the field “Visibility”, select the option “Show” to show your custom field on the filtering form. To hide it, select the option “Hide”. The visibility works like an on/off option.
  3. In the field “Field type”, select one of these options:
    • “Custom field”: This option works with simple custom fields used to store string values. For example, a custom field used to store a price or a name.
    • “Serialized custom field”: This works with custom fields used to store serialized values. In other words, a custom field used to store multiple values as array.
  4. In the field “Custom field name”, enter the name of your custom field (e.g. “price”). Please note that a custom field can only be used once in the filtering form!
  5. The field “Single?” will let you choose whether to allow the users to search by one option or by multiple options:
    • To allow searching by multiple options, choose the option “Multiple”. This will display the options as checkboxes.
    • To allow searching by one option, choose the option “Single”. This will display the options as radio buttons.
  6. Choose the field display type by selecting an option in the field “Field display type”:
    • The option “List” will display the options as a list.
    • The option “Dropdown List” will display the options inside a dropdown list.
  7. Choose whether to display the options list horizontally or vertically by selecting an option in the field “Options list layout”.
    • The option “Horizontal” will display the options horizontally, one next to the other.
    • The option “Vertical” will display the options vertically, one above the other.
  8. In the field “List max options/rows”, specify the maximum number of options to display in the options’ list before activating the scroll. Set to 0 to display all options/rows.
  9. Choose whether or not to show the options list when opening the filter form by selecting an option in the field “Options display status”. When set to “Hide”, the users will have to click on the field title to display the list of options.
  10. To change the order of the custom field values, select an option in the field “Orderby parameter”, then, choose the ascending or descending order in the field “Order parameter”.
  11. Choose wether or not to show the number of posts assigned to your custom field by selecting an option in the field “Show count”.
  12. Choose whether or not to show the number of posts assigned to each custom field value by selecting an option in the field “Show options count”.
  13. To add a new custom field, click on the button “Add new field” and repeat the above steps.

Step 3: Defining the relationship between all your custom fields

Under the button “Add new field”, in the field “Custom fields “Relation” parameter”, select the parameter that defines the relationship between all your custom fields. For example, let’s say you have two custom fields (“Price” and “Size”). Let’s also imagine a situation where a user wants to filter the markers by a price that equals “500$” and a size that matches “XL”:

      • By selecting the relation parameter “AND”, the plugin will try to get all posts having the price “500$” and the size “XL”. Note that a post must have these two values in order to be displayed!
      • By selecting the relation parameter “OR”, the plugin will try to get all posts having the price “500$” or having the size “XL”. Note that a post must have only one of these two values in order to be displayed!