# Add search to your site
Using the Wagtail `start` command to start your project gives you a built-in search app. This built-in search app provides a simple search functionality for your site.
However, you can customize your search template to suit your portfolio site. To customize your search template, go to your `search/templates/search.html` file and modify it as follows:
```html+django
{% extends "base.html" %}
{% load static wagtailcore_tags %}
{% block body_class %}template-searchresults{% endblock %}
{% block title %}Search{% endblock %}
{% block content %}
Search
{% if search_results %}
{# Add this paragraph to display the details of results found: #}
You searched{% if search_query %} for “{{ search_query }}”{% endif %}, {{ search_results.paginator.count }} result{{ search_results.paginator.count|pluralize }} found.
{# Replace the HTML element with the html element: #}
{% for result in search_results %}
-
{% if result.search_description %}
{{ result.search_description }}
{% endif %}
{% endfor %}
{# Improve pagination by adding: #}
{% if search_results.paginator.num_pages > 1 %}
Page {{ search_results.number }} of {{ search_results.paginator.num_pages }}, showing {{ search_results|length }} result{{ search_results|pluralize }} out of {{ search_results.paginator.count }}
{% endif %}
{% if search_results.has_previous %}
Previous
{% endif %}
{% if search_results.has_next %}
Next
{% endif %}
{% elif search_query %}
No results found
{% endif %}
{% endblock %}
```
Now, let's explain the customizations you made in the preceding template:
1. You used `You searched{% if search_query %} for “{{ search_query }}”{% endif %}, {{ search_results.paginator.count }} result{{ search_results.paginator.count|pluralize }} found.
` to display the search query, the number of results found. You also used it to display the plural form of "result" if more than one search result is found.
2. You replaced the `` HTML element with the `` HTML element. The `` HTML element contains a loop iterating through each search result and displaying them as list items. Using `` gives you numbered search results.
3. You improved the pagination in the template. `{% if search_results.paginator.num_pages > 1 %}` checks if there is more than one page of search results. If there is more than one page of search results, it displays the current page number, the total number of pages, the number of results on the current page, and the total number of results. `{% if search_results.has_previous %} and {% if search_results.has_next %}` checks if there are previous and next pages of search results. If they exist, it displays "Previous" and "Next" links with appropriate URLs for pagination.
Now, you want to display your search across your site. One way to do this is to add it to your header. Go to your `mysite/templates/includes/header.html` file and modify it as follows:
```html+django
{% load wagtailcore_tags navigation_tags wagtailuserbar %}
```
You can now run searches and view results. However, the search currently only returns results for words found in the page title. To make other fields searchable, it is necessary to add them to the search index - see [](wagtailsearch_indexing). In `blog/models.py`, add the code below:
```python
# Add to the existing imports:
from wagtail.search import index
class BlogPage(Page):
# Keep the existing parent_page_types, fields, methods and content_panels definitions, and add:
search_fields = Page.search_fields + [
index.SearchField('intro'),
index.SearchField('body'),
]
```
Now run the following command to rebuild the search index, now with the `body` field of `BlogPage` included:
```sh
python manage.py update_index
```
Searching will now return results for words found within the body text.
Well done! You now have a fully deployable portfolio site. The next section of this tutorial will walk you through how to deploy your site.