> ## Documentation Index
> Fetch the complete documentation index at: https://docs.digifist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Template (main-search)

> Configure your search results page with product grid, blog results, and page results display options

The Search template (main-search) controls how search results display, combining products, blog articles, and pages with filtering and customizable metadata display.

![Search results page overview](https://mintlify.s3.us-west-1.amazonaws.com/digifist/images/theme/mojave/main-search-overview.png)

## What this section controls

* Product grid layout and density
* Product filtering and sorting
* Blog article result display with metadata
* Page result display options
* Results per page pagination
* Label and tag display for mixed results

## Getting started

**1. Open Theme Customizer**

In your Shopify admin, go to **Online Store > Themes** and click **Customize** on your active theme.

**2. Navigate to search page**

Use the page selector dropdown to select **Search** or perform a search on your live site.

**3. Locate the template**

The "Search" section controls the search results template.

## Template settings

> [tab] Grid Layout
>
> > [accordion] Products per row - Mobile
> >
> > Control product grid columns on mobile (1-2 products, default: 2).
> >
> > Same as collection page - 2 columns recommended for balanced browsing.
>
> > [accordion] Products per row - Desktop
> >
> > Control product grid columns on desktop (2-4 products, default: 4).
> >
> > 4 columns maintains consistency with collection pages and efficient browsing.
>
> > [accordion] Items per page
> >
> > Total items (products + articles + pages) before pagination (4-48 items, default: 24).
> >
> > **Note**: Mixed result types - 24 items might be 20 products, 3 articles, 1 page.

> [tab] Filtering & Sorting
>
> > [accordion] Enable filtering
> >
> > Shows product filtering controls (enabled by default). Filters managed through Search & Discovery app.
> >
> > **Mixed results behavior**: Filters only apply to products, not blog articles or pages.
>
> > [accordion] Enable sorting
> >
> > Shows sorting dropdown for products (enabled by default). Standard sort options apply.
> >
> > **Note**: Sorting affects product results only.
>
> > [accordion] Show in sidebar on desktop
> >
> > Moves filters to sidebar on desktop (disabled by default - uses horizontal bar).
> >
> > Same options as collection page.
>
> > [accordion] Filters style
> >
> > Square or round filter buttons (default: square). Only applies to horizontal bar layout.

> [tab] Blog Article Results
>
> > [accordion] Show labels
> >
> > Controls label display for blog articles in search results:
> >
> > * **Show blog post label** (default): Displays "Blog post" badge
> > * **Show tags**: Displays article tags instead
> > * **Show none**: No labels
> >
> > Helps distinguish blog articles from products and pages in mixed results.
>
> > [accordion] Tags display count
> >
> > When showing tags:
> >
> > * **Show all** (default): All article tags
> > * **Show first**: First tag only
>
> > [accordion] Show excerpt
> >
> > Display article preview text (disabled by default). Helps users decide relevance.
>
> > [accordion] Show date
> >
> > Display article publish date (enabled by default).
>
> > [accordion] Show author
> >
> > Display article author name (enabled by default).

> [tab] Page Results
>
> > [accordion] Show page label
> >
> > Display "Page" badge on page results (enabled by default).
> >
> > Distinguishes standard pages from products and articles.
>
> > [accordion] Show page excerpt
> >
> > Display page content preview (disabled by default).
> >
> > Enable to help users identify relevant pages quickly.
>
> > [accordion] Show page read more
> >
> > Display "Read more" link on pages (enabled by default).
> >
> > Provides explicit call-to-action for page results.

## Search result types

The search template displays three types of results in mixed format:

**Products**: Displayed in grid matching collection pages, with images and purchase options.

**Blog articles**: Card format with optional metadata (date, author, excerpt, tags).

**Pages**: Simple list format with title, optional excerpt, and "Read more" link.

**Result ordering**: Shopify's search algorithm determines relevance and ranking across all result types.

## Best practices

> [card] Keep labels enabled
>
> Show "Blog post" and "Page" labels to help users distinguish different content types in mixed results.

> [card] Enable article excerpts
>
> Turn on blog excerpt display - helps users quickly determine article relevance from search results.

> [card] Match collection settings
>
> Use same product grid settings (4 columns, filtering, sorting) as collection pages for consistency.

> [card] Show article metadata
>
> Keep date and author enabled for blog results - provides context about content freshness and source.

> [card] Enable page excerpts
>
> Consider enabling page excerpts if you have many pages - helps users identify right page in results.

> [card] Test mixed results
>
> Search for terms that return products, articles, and pages to ensure all result types display correctly.

> [card] Optimize items per page
>
> 24 items balances browsing with performance. Adjust if users frequently paginate or complain about slow loading.

> [card] Configure search filters
>
> Use Search & Discovery app to customize which product filters appear on search results.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.