The custom fields search tool allows you to find posts/locations by custom fields. To add a custom field to the search form, follow these steps:
- Edit your search form
- Click on the menu “Custom fields search”
- If you’re about to add your first custom field, click on the group field “Custom field 1”, otherwise, click on the button “Add new custom field”
- In the field “Label/Title”, enter the title of your custom field (e.g. “Price”)
- In the field “Custom field name”, enter the custom field name. Please note that you can’t use the same custom field multiple times on the same search form!
- In the field “Description”, enter the custom field description
- In the field “Display type”, select a field type
- Open the group field “Field parameters”. Each field type has its own parameters. Edit the field parameters to your needs
- Open the group field “Query parameters”
- In the field “”Compare” parameter”, select the operator to test with during the search request.
- Change the display order of the custom field values by selecting an option in the field “Orderby parameter”
- Select the order option in the field “Order parameter”
- To show the custom field in your search form, select the option “Yes” in the field “Visibility”
- To add another custom field, click on the button “Add new custom field” and repeat the steps from 4 to 13
- Scroll down to the field “”Relation” parameter” and select the relationship between all your custom field
- Save your search form once finished