To display the search form in a page of your website, follow these steps:
- Edit your search map
- Open the widget “Search form shortcode”
- Copy and paste the search form shortcode in your page.
The shortcode [cspm_advanced_search]
supports the following attributes:
The ID of the search form to display. This attribute is required! When not provided, the plugin will display the message “Search form not available!”. More infos about the error can be found on the browser console.
Example: [cspm_advanced_search id="55"]
The name of the (custom) post type to search within.
Example: [cspm_advanced_search id="55" post_type="page"]
the URL of the page on which you want the search form to redirect to (the map page where you want to load the search result).
Example: [cspm_advanced_search id="55" redirect_to="www.website.com/listing_page"]
Whether to open the result page in a new window, the same window or inside a modal/popup. Possible values are new_window
, same_window
, popup
.
Example: [cspm_advanced_search id="55" redirect_type="popup"]
The title of the search form.
Example: [cspm_advanced_search id="55" form_title="Another title"]
The description of the search form.
Example: [cspm_advanced_search id="55" form_desc="Another description"]
The text of the “Search” button.
Example: [cspm_advanced_search id="55" search_btn_text="Find"]
The text of the “Reset” button.
Example: [cspm_advanced_search id="55" reset_btn_text="Clear All"]