How to use the search form fields builder.

How to use the search form fields builder.

Added with version 1.4, the theme now comes with an integrated search builder that helps you in adding your custom fields.

Understanding the logic of the search fields.

It is important that you understand what is the logic behind the search form and the fields before you think that the search form doesn't work.

  1. The advanced search form only looks for your listings. It doesn't look for addresses on the map. Meaning the search query only looks in your database.
  2. The first text input field looks for the listing title and the listing content.
  3. The listing category and location fields, uses the operator "IN" meaning they search for the listings that are INTO those taxonomies.
  4. The featured/not featured options check for the value of the featured listing option that you can set for each field. They uses the "meta_key" value of the listings custom field.
Adding New Fields Through The Search Form Fields Builder.
  1. Your theme version must be 1.4 or greater.
  2. Navigate to "Theme Options" -> "Search Form Fields" -> "Custom Search Fields" to access the fields builder.
  3. Press the "Add New Field" button, a popup will display just above the button from where you can select the type of field that you want to add.
  4. Select the kind of field that you wish to add and follow the instructions of each field.
Using the author field

The author field allows you to display a field where the user can select from which authors he wants to search for the listings.

To use the field, select it from the options of the search builder and fill in the deatils.

Using the HTML field

The html field is a useful field that allows you to insert any kind of html content, it is extremely useful when you'd like to modify the appearance of the from.

To use the field, select it from the options and then insert your custom html content.

Using the Meta Key field

The metakey field is one of the most powerful field of the search builder. It gives you extreme flexibility on what listing custom field the search form should look for.

The most important option that you need to fill in the "meta key" option, this is where you insert the value of the custom field that the search form will be looking for.

Note: the metakey value is the field name of the listing custom field. (It isn't the field label - label and name are 2 different things) How to retrieve the field name? Easy, when you create a custom field, the field name is just right here (click for a screenshot). So, the field of the search builder, will look like this (click for screenshot)

If your search field is a selectable field (select, multi-select, radio, checkbox), you need to add the options of the form. To add options simply follow the following format:

field_value=Option Label

"field_value" stands for the option that your custom listing field might have, it's also the value that the search form will look for.

"Option Label" is the name of the option that the user will see into the search form. To add multiple options simply add the symbol % in the middle of each option.

Example: test1=label1%test2=label2