Search
When customers search your online store, they land on the search results page. Heirloom shows matching products in a grid with the same filters and sort options as a collection page, followed by matching blog posts and pages.
Edit the search page
Steps:
- From your Shopify admin, go to Online Store > Themes.
- Find Heirloom, and then click Edit theme.
- From the page selector at the top of the theme editor, select Search.
- In the sidebar, click Search, or one of the blocks inside it.
- Change the settings that you want.
- Click Save.
Search section
The Search section shows the page heading and a search field, followed by any blocks that you add, and then the Filters, Toolbar and Search results blocks, which are always there.
You can add these blocks above the results:
- Theme blocks, such as Heading, Text, Button and Image
- App blocks from apps you install
Filter layout works as it does on collection pages. Filters on the search page narrow products only, so when a customer applies a filter, a short line explains that blog posts and pages aren’t filtered. Learn more about filters and sorting.
Settings
- Search field placeholder: The gray hint inside the search field on this page. Leave it blank to use Search field placeholder in Theme settings > Search, or the standard hint in each customer's language when that is blank too.
- Filter layout: Where the filters sit from 990 pixels wide. Automatic is a bar for two filters or fewer and a sidebar for more. Phones use a drawer.
Section style
- Color scheme: The colors of the search page.
- Vertical padding: The space above and below the section.
Search results
The Search results block shows the results a page at a time. When results include more than one type, such as products and blog posts, tabs at the top let customers show one type at a time. The All tab shows the products first, then blog posts and pages.
- Show result type tabs: Shows tabs for each type of result, such as Products, Articles and Pages. The tabs show only when results include more than one type.
- Show excerpt: Shows the start of each blog post or page under its title.
Layout
- Columns on desktop: How many products show in each row on large screens.
- Columns on mobile: How many products show in each row on phones.
- Results per page: How many results load on each page.
- Pagination: Page numbers shows links to each page. Load more button adds the next page of results under the current ones.
Messages
- Message before a search: Shown when the page opens with no search; blank uses the standard message.
- Message when nothing is found: Use [term] where the search goes; blank uses the standard message.
Popular searches and collections
- Popular searches: Separate with commas; blank uses the list in Theme settings > Search.
- Popular searches heading: Leave blank to use "Popular searches".
- Popular collections: Up to 4; empty uses the collections in Theme settings > Search.
- Popular collections heading: Leave blank to use "Popular collections".
Products when nothing is found
- Show products when nothing is found: Shows a row of products under the message.
- Products heading: Leave blank to use "Suggestions".
- Products to show: Leave empty to show products from your whole store.
Shop all button
- Show Shop all button: Shows a Shop all button under the popular searches and, when nothing is found, under the suggested products.
- Button label: Leave blank to use "Shop all".
- Button link: Leave empty to link to all products.
Click Search results in the sidebar to change the words on the page. A blank text setting uses the standard wording in each customer’s language, so your translations keep working.
When there are no results
Before a customer searches, the page shows a short message, your popular searches and popular collections, and a Shop all button. When a search finds nothing, the page shows the same, with a row of suggested products above the button. The heading is one step smaller, and there are no result type tabs. When a customer’s filters match nothing, the page shows Clear all instead.
You can change each part in the Search results block:
- Message before a search and Message when nothing is found replace the standard sentences. In the second one, type [term] where the customer’s search should appear.
- Popular searches and Popular collections hold the lists for this page. Leave them blank to use the lists in Theme settings > Search, which also feed the quick results while customers type. The three headings above the lists, and the suggested products’ heading, can be reworded too.
- Show products when nothing is found turns the suggested products on or off. Products to show picks a collection for them, and a blank one suggests products from your whole store.
- Show Shop all button turns the button on or off. Button label renames it, and Button link sends it somewhere other than your all products page.
What search finds
Shopify’s search finds products, blog posts and pages. By default, the Search & Discovery app decides which of these show. To choose them in the theme instead, change Result types in Theme settings > Search. Collections can show in the quick results while customers type, but not on the search results page.
Learn more about search settings.
Quick results while typing
As customers type in the search field in the header, Heirloom can show quick results: products, collections, blog posts, pages and suggested searches. When the field is empty, it can show your popular searches and popular collections instead. You turn quick results on or off, and choose what they show, in Theme settings > Search. Learn more about search settings.
One search field
The search page, the 404 page, the Search block and the search bar in the header all use the same field: a bordered field with a search button inside it, the same height as the theme’s other fields. A clear button shows once the customer types.
Add a search field to a page
To add a search field to any section that accepts theme blocks, such as a banner on your home page or a page about your store, add a Search block.
Steps:
- In the theme editor, click the section that you want to add the search field to.
- Click Add block, and then select Search.
- Click Save.
The Search block has one setting, Placeholder, the gray hint inside the field. Leave it blank to use Search field placeholder in Theme settings > Search, or the standard hint in each customer’s language. The block shows the same quick results as the header search. The search box on your 404 page is this block, so change its hint there.
- Placeholder: The gray hint inside the field. Leave it blank to use the placeholder in Theme settings > Search.
Related
- Learn more about filters and sorting.
- Learn more about search settings.
- Learn more about collection pages.