Shortcode


To display the search form in a page of your website, follow these steps:

  1. Edit your search map
  2. Open the widget “Search form shortcode”
  3. Copy and paste the search form shortcode in your page.

The shortcode [cspm_advanced_search] supports the following attributes:


id (required)

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"]


post_type

The name of the (custom) post type to search within.

Example: [cspm_advanced_search id="55" post_type="page"]


redirect_to

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"]


redirect_type

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"]


form_title

The title of the search form.

Example: [cspm_advanced_search id="55" form_title="Another title"]


form_desc

The description of the search form.

Example: [cspm_advanced_search id="55" form_desc="Another description"]


search_btn_text

The text of the “Search” button.

Example: [cspm_advanced_search id="55" search_btn_text="Find"]


reset_btn_text

The text of the “Reset” button.

Example: [cspm_advanced_search id="55" reset_btn_text="Clear All"]