Search Results Page
Usage
Open Appearance → Customize → Settings → Search Results Page to edit the Body message shown above search results. Type %query where the visitor's search term should go and %results for the number of matches. Both are filled in automatically and shown in bold.
The default reads: "A search for %query returned %results matches."
When to use it
- Matching the search page to your brand voice ("We found %results ideas for '%query'").
- Adding a short second sentence or line break before the results.
- Simplifying the wording for your audience.
Tips
- Run a search on the live site after publishing to see the message with real words filled in.
- You can put the placeholders in any order, but type them exactly as
%queryand%results. - The words a visitor searched for are highlighted in yellow in each result's title and summary. If a page's opening words don't contain them, its summary shows the passage where they first appear.
- This only changes the message. The layout of the results below it is set by the theme (see How results are laid out).
How results are laid out
Results are grouped by kind, in this order:
- Pages: a short list. Each page shows its title, the pages it sits under (for example "Classes / Wheel throwing") and the passage that matched.
- Plugin sections, such as classes, degrees, program events, events or people, each shown its own way.
- Products (on a WooCommerce store): small tiles with the product image, name and price, or "Sold out". See WooCommerce.
- Posts: rows with the date, the category and a small thumbnail on the right.
- Everything else (portfolio items and other kinds without a section of their own) as cards, with page numbers.
Each group opens with its count ("7 pages") and lists its first few matches. When there are more, Explore all 16 posts opens a search for that kind alone, with every match and page numbers. For products it opens the store's own product search, laid out like the shop.
When nothing falls into the last group, the last list with matches takes its place: it shows every match, a page at a time. A site with only pages lists them all with page numbers, and a blog shows the first five pages and then every matching post.
Posts hidden from search stay out of every group and every count.
The search boxes in the header, mobile menu and footer also list the first few matches of each group as visitors type (see Results As You Type).
Best match
When the search words are one item's title, near enough exactly, that item shows as a large card above the groups, marked Best match: a search for "contact" goes straight to your Contact page, and a person's name to that person. The card shows the featured image (as a square beside the text when it's a portrait or square, like a headshot), the page's parents or the item's kind, the title, the passage that matched and View page.
- Capitals, accents and punctuation don't matter, and neither do an opening "a", "an", "the" or "our" or a closing "us": "contact" finds a page called Contact Us, and "team" finds Our Team. A title that matches exactly wins over one that only matches without those words.
- The item must be one the search finds anyway, so the card never shows something the results don't.
- Only one item may match. Two pages with the same title (say, a Contact page under each location), or a page and a post with the same title, show no card, and the results show as usual.
- Pages, posts, products, people and degrees can be the card. Classes and events can't yet, as their lists filter what they show (events list upcoming ones only).
- The item stays in its group below, so every count is unchanged. The card shows on the first page of results only, and not on an Explore all search.
- Pages hidden from search, password-protected pages, the 404 page and WordPress's untouched sample page never show as the card.
Short, distinct titles make the most of it: a page titled Hours answers a search for "hours".
When nothing matches
A search that finds nothing helps the visitor on, with nothing to set up:
- Did you mean …? When a searched word looks like a misspelling of a word in your page and post titles ("reserch" for "research"), the page offers the corrected search. It's only offered when the corrected words find something.
- A tip to try fewer or different words.
- Or start from one of these pages: up to six pages from your main menu, in menu order. A menu item that only opens a dropdown gives its first few pages instead. With no main menu, your top-level pages are listed.
- Still can't find it? A link to your contact page (a menu link starting with "Contact", or a page at
/contact/or/contact-us/) and the phone number from Site → Contact & Social. With no contact page, the email address is shown instead.
A search for one kind that finds nothing (after Explore all N posts, say) adds Search the whole site for "…" when the rest of the site has matches. An old link to a page past the end of the results ("page 9" of a search with two pages) shows Back to the first page.
To change the pages offered, change your main menu. Titles that read well as search words help the spelling suggestions.
Settings
Search Results Page
Any use of %query will be replaced by the user query and %results by the number of results