Search Form

Default Shortcode

Following is default shortcode to render property search form.

[rem_search_property]

It will display the following fields in 2 columns layout.

  • Search Text
  • Address
  • Property Type
  • Property Country
  • Property Purpose
  • Price slider

Custom Search Fields

You can manage fields in search form using fields_to_show attribute. It accepts field names separated by commas. The following shortcode will display only Property Type and Purpose dropdowns in the search form.

[rem_search_property fields_to_show="property_type,property_purpose"]

Default field names that you can use are.

  • search
  • order
  • orderby
  • agent
  • property_area
  • property_address
  • property_state
  • property_zipcode
  • property_city
  • property_country
  • property_rooms
  • property_price
  • property_type
  • property_purpose
  • property_status
  • property_bedrooms
  • property_bathrooms

You can also use custom fields, by specifying their data names.


Search Form Layout

You can customize the columns in each row by using columns attribute. The following shortcode will display 3 fields in a row. Search Box, Property Type, and Price Range Slider.

[rem_search_property fields_to_show="search,property_type,property_price" columns="4"]

You can provide the following values for columns attribute.

  • 12 – 1 Column
  • 6 – 2 Columns
  • 4 – 3 Columns
  • 3 – 4 Columns

Customize Search Button Label

Customize the label used for the search button using search_btn_text attribute.

[rem_search_property fields_to_show="search,property_type,property_price" columns="4" search_btn_text="Find Your Home"]


Customize More Filters Button Label

Customize the label used for More Filters button using filters_btn_text attribute.

[rem_search_property fields_to_show="property_type,property_price" filters_btn_text="Advanced Options"]

You can also disable the More Filters option by setting the filters_btn_text value to empty. Example: filters_btn_text=”


Create a Reset Fields Button

Create reset search fields button using reset_btn_text attribute and setting its value to the button’s label.

[rem_search_property fields_to_show="property_type,property_price" reset_btn_text="Reset"]


Display Properties before Searching

If you want to display some listings with search form before searching and when a user performs a search, replace with the search results. You can do it by inserting list shortcode inside search shortcode. See the following example

[rem_search_property][rem_list_properties][/rem_search_property]


Search in Specific Criteria

Suppose you need a search form that searches only rented properties without giving a visitor the option to change property purpose. For this, you can use fixed_fields attribute. Provide field name and value separated by pipe | sign. Following search form will display Property Type and Price Range to search, but will only search for those properties which are for rent.

[rem_search_property fields_to_show="property_type,property_price" fixed_fields="property_purpose|Rent"]

You can use multiple values in fields_to_show attribute separated by commas. Same as meta attribute in List Properties shortcode.


Custom Results Page (Disable AJAX)

If you’re using the search form on the homepage and don’t want to display results under the form, you can open a separate page for results. Use results_page attribute and set its value to results page URL. Consider we have a page for displaying results and its URL is http://site.com/results

[rem_search_property results_page="http://site.com/results"]

Please note that the results page must have shortcode [rem_search_results]where you want to display results.


Change Results Place

If you’re using the search form in widget then you may don’t want to display results under the form via AJAX. You may want to display them inside the content area but still want to display them using AJAX without page reload. You can do that by creating a div and giving it a unique id. Then you can use results_selector attribute to display results in that div. Consider we have a div and id=”custom-results”

[rem_search_property results_selector="#custom-results"]

You should have a little knowledge about HTML Selectors to use this option.


Sort Search Results

You can sort search results by custom order using order and orderby attributes.

[rem_search_property order="DESC" orderby="price"]

You can use the following values for order attribute

  • DESC – Descending order of orderby attribute
  • ASC – Ascending order of orderby attribute

You can use the following values for orderby attribute

  • date – Sort by Property published date
  • ID – Sort by Property ID
  • author – Sort by Property Agent
  • title – Sort by Property Title
  • modified – Sort by Property Modify Date
  • rand – Random order
  • price – Property Base Price

All Available Attributes

Attributes Description Default Value
fields_to_show Comma-separated field names to display in the search form property_address,search,property_type,property_country,property_purpose,property_price
columns Columns for each field from 12 columns grid 6
search_btn_text Text to display on the search button Search
filters_btn_text Text to display on filters button More Filters
reset_btn_text Text to display on the reset button
fixed_fields Provide fixed fields to search in specific criteria, values should be the same as the meta attr
results_page Provide URL of the results page if you don’t want to use AJAX
results_selector Provide selector if you want to display results in a specific area of the same page
disable_eq_height By default, all fields adjust their height automatically, you can disable this behavior by setting this attribute to enable
more_filters_column_class You can maximize the area for search filter values by changing these classes col-xs-6 col-sm-4 col-md-3
agent_id Provide agent id to display specific results
order Order of results displayed, ASC or DESC ASC
orderby Sort results by date, ID, title or rand for random
auto_complete Auto complete for text fields enable