Search
The theme can add a search icon to the header. Selecting it opens a full-screen search box that shows results as the visitor types. Pressing Enter, or selecting View all results, opens the full search results page. Header search is off until you turn it on.
When to use it
Section titled “When to use it”- Content-heavy sites where people look things up: public bodies, schools, associations, large blogs.
- Small sites that people navigate through the menu may not need it.
How to turn it on
Section titled “How to turn it on”- Go to Appearance → Customize → Header → Search.
- Tick Show Search Icon.
- Optionally tick Show “Search” Text Label to show the word beside the icon.
- Select Publish.
| Option | What it does | Default |
|---|---|---|
| Show Search Icon | A search icon in the header’s actions, beside any cart icon and buttons. | Off |
| Show “Search” Text Label | Shows the word “Search” next to the icon. Recommended where search is a main way to navigate. | Off |
An AI assistant can set both through Promptless WP’s wordpress_header_set
tool.
Using the search box
Section titled “Using the search box”- Open it with the icon, with
Ctrl+K(Cmd+Kon a Mac), or with/when the cursor is not in a text field. - Results appear after two characters: up to six, each with its title and content type. They come from WordPress’s built-in search.
- Move through results with the arrow keys;
Enteropens the highlighted result, or the full results page when none is highlighted. - Close it with
Esc, the close button, or by selecting outside the box. Focus returns to the search icon.
Screen readers announce the number of results as they change. On phones the box fills the screen and stays above the on-screen keyboard.
If the site blocks the connection instant results use, the box says “Instant results are unavailable here. Press Enter to see all matching results.” and the results page still works. Without JavaScript the box is a plain search form.
The search results page
Section titled “The search results page”The results page, which also serves searches from any other search form on the site, shows:
- the heading “Search results for: term”;
- the results as cards, the same as an archive, with page numbers;
- when nothing matches, a short message and a search form to try again.
Show Date on Post Cards and Show Author on Post Cards in Appearance → Customize → Content apply to result cards too. Pages in the results never show a date or author.
Limits and common problems
Section titled “Limits and common problems”- The search icon does not appear. Show Search Icon is off.
- Instant results say they are unavailable. Something between the browser
and the site, such as a security plugin, firewall or password protection, is
blocking WordPress’s REST API. Allow
/wp-json/wp/v2/search, or rely on the results page. - The shortcut does not open search.
/is ignored while the cursor is in a text field. - Results are missing some content. The theme uses WordPress’s own search, which matches words in titles and content. Install a search plugin to change what is searched.
Available since Promptless Theme 1.3.0.