# Predictive search

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FMM3A1LQflPiOoqDgwzEz%2F2024-02-2318-33-22-ezgif.com-gif-to-webp-converter.webp?alt=media&#x26;token=bddf1c87-be1b-4aca-b8ff-b1414740f434" 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://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2F2x00K5p0HyqtI2MdhkpD%2FUntitled%20(3).png?alt=media&#x26;token=e95dc1aa-c7f7-4508-ae6f-e4aa16dcce68" alt=""><figcaption></figcaption></figure>

## **Settings**

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FiJtw0C3sXt51xpM51rrT%2FUntitled%20(4).png?alt=media&#x26;token=798d9c24-9475-43e4-bf29-f9cd5237a000" 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://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FIIsW4MWshgldNG18IXJC%2FUntitled%20(5).png?alt=media&#x26;token=67446de6-7409-4b6c-9ebf-0a0400000c39" 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://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FGLbuRQesUqOSvGsmOtVb%2FUntitled%20(6).png?alt=media&#x26;token=873c8eac-485c-4491-94cc-4828c3da7e7a" 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.
