# Predictive search

<figure><img src="https://content.gitbook.com/content/wp6wpeVynqvtz0WMVrUT/blobs/y0FlLW4lGaNW8BfcQL6w/2024-02-2318-33-22-ezgif.com-gif-to-webp-converter.webp" alt=""><figcaption></figcaption></figure>

This block of settings is intended for general **Predictive search** settings on the site.

In order to get to the **Predictive search** settings block, you need to go to **`Customizer`** → **`Theme Settings`** → **`Predictive search`**.

<figure><img src="https://content.gitbook.com/content/wp6wpeVynqvtz0WMVrUT/blobs/k9VsUzU8j8zKQh9HfPNs/Untitled%20(3).png" alt=""><figcaption></figcaption></figure>

## **Settings**

<figure><img src="https://content.gitbook.com/content/wp6wpeVynqvtz0WMVrUT/blobs/oR0Ydm5BOc26BEsl3gAT/Untitled%20(4).png" alt=""><figcaption></figcaption></figure>

1. **`Enable search by articles`** - setting allows to include articles in the search;
2. **`Enable search by pages`** - setting allows to include pages in the search;
3. **`No results text`** - setting allows to set no result text.
4. **`Button label`** - settings for input placeholder, if it is empty then text from theme translations will be displayed.

### Most searched

<figure><img src="https://content.gitbook.com/content/wp6wpeVynqvtz0WMVrUT/blobs/vMD3EpdcMG90T5pmPtKp/Untitled%20(5).png" alt=""><figcaption></figcaption></figure>

1. **`Heading`** - setting allows to set heading when search input is empty;
2. **`Links`** - setting allows to set menu when search input is empty;

## **Additional information**

1. If the `Enable search by articles` or `Enable search by pages` setting is enabled, then **tabs** appear in the search **sidebar**. If no results are found in any of the categories, then this tab will be **disabled**.

<figure><img src="https://content.gitbook.com/content/wp6wpeVynqvtz0WMVrUT/blobs/OxQG2cDqijwKiQoAlw0Y/Untitled%20(6).png" alt=""><figcaption></figcaption></figure>

2. If the search does not return any results, then the search button becomes disabled and a corresponding message is displayed.

## **For Developers**

1. The `predictive-search.liquid` snippet is included in the code, in the `theme.liquid` file.
