Filter posts by custom fields


To filter posts by custom field(s), do the following:

Step 1: Adding a custom field

  1. Edit a map
  2. Open the widget “List & filter Settings”
  3. Click on the menu “Search filter settings”
  4. Scroll to the section “Custom fields parameters”
  5. Open the group field “Custom field 1” (or click on the button “Add new custom field” if this is not the first time to add one)

Step 2: Setting up the custom field parameters

  1. In the field “Label/Title”, enter the title of your custom field (the title that’ll appear in the filter form! e.g. “Price”)
  2. In the field “Custom field name”, enter the name (meta key) of your custom field.
  3. In the field “Description”, enter a description of your custom field. The description will appear in the filter form!
  4. Choose the display type of your custom field by selecting an option in the field “Display type”.
  5. Open the group field “Field parameters” and adjust the settings of your custom field:
    1. If you’d like to add a symbol/text (a curreny for example) next to the custom field, type it in the field “Symbol”, then, choose its position by selecting an option in the field “Symbol position”.
    2. To show the number of posts assigned to your custom field, select the option “Yes” in the field “Show count”. This option will help users to know if they may get any result before filtering the posts!
    3. If the display type of your custom field is “Range text input (Min & Max)”, you may need to make some adjustments in the fields “Text Mask”“Clear if not match the mask?” and “Text placeholder”. Under each of this fields, you’ll find a description of what you need to do!
    4. If the display type of your custom field is “Price input” or “Range Price input (Min & Max)”, you may need to make some adjustments in the fields “Cents separator”“Thousands separator”, “Price limit”, “Cents limit” and “Allow negative price?”. Under each of this fields, you’ll find a description of what you need to do!
    5. If the display type of your custom field is “Checkbox” or “Radio” or “Select”, you may need to make some adjustments in the fields “”Search All” Option and “”Search All” Label”. Under each of this fields, you’ll find a description of what you need to do!
    6. If the display type of your custom field is “Datepicker, you may need to make some adjustments in the fields “Custom field date format”“Date components separator”, “Start date”, “End date” and “Week start”. Under each of this fields, you’ll find a description of what you need to do!
  6. Open the group field “Query parameters”:
    1. In the field “Are custom field values serialized?”, select “Yes” if your custom field values are stored in the database as a serialized ARRAY. Alternatively, choose “No” if the custom field values in the database are simple strings. Please note that with serialized custom fields, the compare parameter of the meta query will always be set to “LIKE”!
    2. In the field “”Compare” parameter”, choose the operator to test with when filtering the posts.
    3. In the fields “Orderby parameter” and “Order parameter”, choose the display order of the custom field values. For example, if you use a custom field to save the post’s price and that you want to display all available prices in the filter form as a checkbox list, the plugin will automatically get all the values saved inside the database and will display them according to that “orderby” and “order” parameters.
  7. In the field “Display status”, choose whether to open or close the custom field container on page load.
  8. In the field “Visibility”, choose whether to show or hide the custom field in the filter form. This option is useful in case you want to temporarily hide the custom field without having to delete it!
  9. To add a new custom field, click on the button “Add new custom field” and repeat the above steps.

Step 3: Defining the relationship between all your custom fields

Under the button “Add new custom field”, in the field “”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 posts 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!

Filter posts by taxonomies


To filter posts by taxonomies, do the following:

Step 1: Adding a taxonomy

  1. Edit a map
  2. Open the widget “List & filter Settings”
  3. Click on the menu “Search filter settings”
  4. Scroll to the section “Taxonomies parameters”
  5. Open the group field “Taxonomy 1” (or click on the button “Add new taxonomy” if this is not the first time to add one)

Step 2: Setting up the taxonomy parameters

  1. In the field “Label/Title”, enter the title of your taxonomy (the title that’ll appear in the filter form! e.g. “Category”)
  2. In the field “Taxonomy name”, select a taxonomy (e.g. “category”).
  3. In the field “Description”, enter a description of your taxonomy. The description will appear in the filter form!
  4. Choose the display type of your taxonomy by selecting an option in the field “Display type”.
  5. (Optional) In the field “Exclude terms”, Select the terms that you want to exclude from the filter.
  6. (Optional) In the field “Include terms”, Select the terms that you want to include in the filter. By default, the plugin will get all the terms!
  7. In the field “”Operator” parameter”, choose the operator to test with when filtering the posts.
  8. In the fields “Orderby parameter” and “Order parameter”, choose the display order of the taxonomy terms. For example, if you use a taxonomy to save the post’s category and that you want to display all available categories in the filter form as a checkbox list, the plugin will automatically get all the terms saved inside the database and will display them according to that “orderby” and “order” parameters.
  9. In the field “Hide empty terms”, choose whether to hide or show the terms that are not assigned to any post.
  10. In the field “”Search All” Option”, choose whether you want to add an option that allows the users to select all the terms by a one click. When set to “Yes”, you may need to change the text/label to use for this option in the field “”Search All” Label”.
  11. To add a symbol/text next to the taxonomy terms, type it in the field “Symbol”, and choose its display position in the field “Symbol position”.
  12. To show the number of posts assigned to each term, select the option “Yes” in the field “Show count”. This option will help the users to know if they may get any result before filtering the posts!
  13. In the field “Display status”, choose whether to open or close the taxonomy container on page load.
  14. In the field “Visibility”, choose whether to show or hide the taxonomy in the filter form. This option is useful in case you want to temporarily hide the taxonomy field without having to delete it!
  15. To add a new taxonomy, click on the button “Add new taxonomy” and repeat the above steps. Please note that you cannot use the same taxonomy multiple times in the same filter!

Step 3: Defining the relationship between all your taxonomies

Under the button “Add new taxonomy”, in the field “”Relation” parameter”, select the parameter that defines the relationship between all your taxonomies. For example, let’s say you have two taxonomies, each with different terms:

  1. Category:
    1. Colored
    2. Not colored
  2. Color:
    1. Red
    2. Blue
    3. Yellow

Let’s also imagine a situation where a user wants to filter the posts by the category “Colored” and the color “Red”:

    • By selecting the relation parameter “AND”, the plugin will try to get all posts with the category term “Colored” and the color term “red”. Note that a post must have these two terms in order to be displayed!
    • By selecting the relation parameter “OR”, the plugin will try to get all posts with the category term “Colored” or with the color term “Red”. Note that a post must have only one of these two terms in order to be displayed!

Filter posts by publish date


To filter posts by publish date, do the following:

  1. Edit a map
  2. Open the widget “List & filter Settings”.
  3. Click on the menu “Search filter settings”.
  4. Scroll down to the section “Posts Publish Date Parameters”.
  5. Select the option “Yes” in the field “Filter posts by publish date”.
  6. In the field “Display status”, choose whether you want to keep that field opened in the filter on page load or not.
  7. Scroll down to the section “Posts publish date parameters” and click on the group field “Datepicker parameters”.
  8. in the field “Title”, enter the title/label to display for that field in the filter.
  9. In the field “Description”, enter the description that will help users to understand how to use this field to filter posts.
  10. Choose an option in the field “Filter by”. The option “Exact date” will show posts published in the selected date. The option “After date” will show posts published after the selected date. The option “Before date” will show posts published before the selected date and the option “Between two dates” will show posts published between the selected dates.
  11. Choose the date format of the datepicker in the field “Date format”.
  12. In the field “Exclude date attributes” you can remove one or more attributes from the date. For example, to remove the day number from the datepicker, select the option “Day”.
  13. In the field “Start date” you can specify the minimum date of the datepicker. All dates before the start date will be disabled.
  14. In the field “End date” you can specify the maximum date of the datepicker. All dates after the end date will be disabled.
  15. In the field “Start view”, select the start view of the datepicker when loaded. For example, to load the datepicker on years, select the option “Years”.
  16. Select the week start of the datepicker in the field “Week start”.
  17. To automatically open the datepicker on page load, select the option “Yes” in the field “Auto show”.
  18. To append the datepicker in the filter, select the option “Yes” in the field “Inline”.

Filter posts based on a keyword


To filter posts based on a keyword, do the following:

  1. Edit a map
  2. Open the widget “List & filter Settings”.
  3. Click on the menu “Search filter settings”.
  4. Scroll down to the section “Keyword filter Parameters”.
  5. Select the option “Yes” in the field “Keyword filter”.
  6. In the field “Display status”, choose whether you want to keep the keyword field opened in the filter on page load or not.
  7. in the field “Title”, enter the title/label to display for that field in the filter.
  8. In the field “Text field placeholder”, enter the text to display as the placeholder of that field in the filter.
  9. In the field “Description”, enter the description that will help users to understand how to use this field to filter posts.

Change the display order of the fields in the search filter form


To change the display order of the fields in the search filter form, do the following:

  1. Edit a map
  2. Open the widget “List & filter Settings”.
  3. Click on the menu “Search filter settings”.
  4. In the field “Filter fields display order”, drag an element to the position where you want it to be.
  5. To change the display order of the taxonomies, edit a taxonomy, sroll down to bottom, just under the field visibility and make use of the top and bottom arrows to change the display order.
  6. To change the display order of the custom fields, edit a custom field, sroll down to bottom, just under the field visibility and make use of the top and bottom arrows to change the display order.

Show or hide the search filter on page load


To show or hide the search filter on page load, do the following:

  1. Edit a map
  2. Open the widget “List & filter Settings”.
  3. Click on the menu “Options bar settings”.
  4. Select the option “Show” in the field “Options Bar Visibility”.
  5. Click on the menu “Search filter settings”.
  6. Select an option in the field “Search Filter display option”. The option “Show on page load” will show the filter on page load and the option “Hide on page load” will hide the filter. To open the filter, a user must click on the button “Refine search”.

Display the search filter in left side or the right side of the list


To choose the display position of the search filter, do the following:

  1. Edit a map
  2. Open the widget “List & filter Settings”.
  3. Click on the menu “Search filter settings”.
  4. Select an option in the field “Search Filter position”. The option “Left” will display the filter in the left side of the page and the option “Right” will display the filter in the right side of the page.

Activate the search filter


To activate the search filter, do the following:

  1. Edit a map
  2. Open the widget “List & filter Settings”.
  3. Click on the menu “Search filter settings”.
  4. Select the option Yes” in the field “Search Filter option”.