Search Shortcode (Microsearch)

Summary


Insert a search box that searches a custom part of the site.


Attributes

All attributes are optional.

cs_id

Define a different Custom Search ID than the one specified in the site plugin options. This can be used in place of, or in conjunction with path_list to narrow results to specific paths. Also, it can be used to broaden results beyond wisconsin.edu. For new Custom Search IDs visit the site for your search provider. You must use the search provider specified in site plugin options.

Bing:  https://www.customsearch.ai/

Google: https://cse.google.com/cse/all

(Example: cs_id="003309592323798773668:59r1uhkw2o4")

Default: The value set in site plugin options.

path_list

Narrow search by specifying the path(s) that should be searched. For example, to search all of the documents on your site, use https://www.wisconsin.edu/regents/download/. Make sure this doesn't become a hyperlink. Multiple paths can be listed separated by a space.

(Example: path_list="www.wisconsin.edu/general-counsel/download www.wisconsin.edu/regents")

Default: Search the whole site.


title

This is displayed on the search results page. %s will be replaced by the search query.

(Example: title="Searching general records schedules for '%s'")

Default: "Search results for '%s'"

button_text

The text on the search button.

Default: Search

placeholder

This is displayed in the search text box before it is clicked on.

Default: Search query

Example

[microsearch title="Searching general records schedules for '%s'" placeholder="e.g. 'Advising'" path_list="www.wisconsin.edu/general-counsel/download" cs_id="003309592323798773668:59r1uhkw2o4"]