[rep_search_form]
The shortcode displays a search form on the website.
Product
Shortcode Attributes
There are a number of shortcode attributes available which you can use to customise the output.
GENERAL LAYOUT
- filter_popup – Specifies whether to display filter options in a popup.
- Default:
0. - Options:
1or0.
- Default:
- modal_only – Indicates whether the search form should be displayed as a modal (popup) only.
- Default:
0. - Options:
1or0.
- Default:
- include_labels – Specifies whether to include labels in the search form.
- Default:
1. - Options:
1or0.
- Default:
SECTION
- classes – Adds an HTML wrapper class so you can modify the specific output with custom CSS.
CONTENT
- event_type – Specifies the event type for the search form.
- search_types – Specifies the types of searches available in the search form.
- Default:
sale,lease,sold,leased,sell,manage,suburb_report,employee,agency,suburb.
- Default:
- listing_categories – Specifies the listing categories to filter the search.
- Default:
residential,commercial,business,land,rural,holiday.
- Default:
- meta_filters – Specifies the meta filters for the search form.
- Default:
property_type,bed,bath,car,price,land,floor.
- Default:
Example Usage
[rep_search_form event_type="sale" search_types="sale,lease" listing_categories="residential,commercial"]
| Example: This example displays a search form specifically for property listings related to sales. It allows users to search for properties that are available for sale and lease within the residential and commercial categories. |
Checks the page context (e.g., if it’s rep_agency, all listing categories are added).
Initializes attributes using helper methods.
Displays either the search form or a button to open filters in a modal window.