Simple Search Field
The Simple Search form looks simple because it has only a search bar, but it is more powerful when it comes to search listings. Great thing is that you can program it yourself.
Please follow the below steps to configure it.
- Create a page to display search form (we will call it Search Page)
- Create a page to display search results (we will call it Results Page)
- Now Paste shortcode [rem_search_results] in Results Page
- Copy the URL of the Search Results page (let say its http//some_site.com/results)
- Paste this shortcode in Search Page [rem_simple_search results_page=”http//some_site.com/results”] (remember to replace the Results Page url with your own)
- That’s it, it will render a search form like this
By default, text written in this field will be searched in the Property Titles and Contents. But you can make it more powerful.
Making it more powerful
You can configure the settings for this simple search field here
In the setting field Simple Search Method, you can provide each query per line. Each query contains the following values separated by commas respectively.
- text – The text you want the user to type
- meta_key – Meta key or field name, according to that text
- is_number – If the text is a number value, set it to true
- value – Hard-coded value, if not number.
Hope you don’t understand these 🙂 Don’t worry. I will try to explain it using examples.
Suppose we want visitors to type Rent in the search field and then display all those properties in results that have purpose set to Rent. We will provide the following query in Simple Search Method.
Now, when typing Rent in the search field, it will display all those properties which are for rent.
Let’s take another example,
We want users to type 2 bedrooms and then display all properties having 2 bedrooms, the following query will be used.
Wow, that’s great.
Now you may think that if you want visitors to search for 3, 4 or 5 bedrooms you may have to provide all those queries in each line like
Well, that’s not a good idea. So there is a workaround. You can set the is_number to true and then it will automatically search for the numbers provided. Let’s apply it to our above example,
Now, visitors can type 3 bedrooms, 4 bedrooms, 5 bedrooms, and the search will work accordingly.
You can also use short names, suppose you want visitors to just type 3 baths, or 4 baths or 5 baths, use following
Pretty Cool. The good thing is that you can provide multiple queries in each line in the setting Simple Search Method,
Working with Multi-Language
You can allow visitors to search in their own language. Let’s take above Rent example for the German Language. We will allow users of Germany to search Miete instead of Rent to display rented properties.
You can use the following attributes in [rem_simple_search] shortcode.
|placeholder||Placeholder text to display in the search field||Type to Search…|
|width||Maximum width for the search bar||450px|
|border_color||Text input border color||#E4E4E4|
|results_page||URL of the results page||#|
|search_icon||Search Icon||<i class=”glyphicon glyphicon-search”></i>|