Customize your site's search results page with Divi

Published on 19/01/2021 | 17 comments

It's so easy to customize the search results page on your Divi site! In fact, this tutorial will only take you 5 minutes to complete, but it will help you deliver a more "professional" site.

If you don't know what the search results page is, it's very simple: it's the results presented when a user uses the "magnifying glass" icon to search on your site. The page displayed then presents the results of his search for a given query. It is therefore a dynamic page whose results will vary depending on the user.

To do a test on this Divi Tips blogIf you want to search for a keyword, don't hesitate to enter it using the magnifying glass on the main menu (top right)... You'll see that my search page is customized and doesn't look like the basic page proposed by the Divi theme, as you can see on the following image :

Page de resultats de recherche Divi - basique
Divi Basic vs. Custom Search Results Page

In the image above, you can see that the basic search results page (top) is far less pretty and far less optimized than the custom search results page (bottom).

In this tutorial, I explain how to do it but I also give you 2 other tips... You won't regret going through it 😉 !

1 - Why customize your site's search results page?

If you look at the image below, you can see that a little more than 1% of the visitors of the Divi Tips blog are searching via the magnifying glass icon...

Site Search Google Analytics
On-site search statistics with Google Analytics

In the last 30 days, 348 people have searched my blog to find answers to their questions...

1% of the visits is very little but if I hadn't customized this page of the search results, 348 people would have visited an unoptimized and unbranded page. This does not reflect the image I would like my blog to send back.

This is a good reason to customize this page of the search results: it will match your brand image and will not stand out from the other pages....

Also read: How to add a real-time Ajax search to your Divi site

2 - Composition of the layout of the search results page

If you look at my search results page, it is composed of 5 elements:

Composition d'une page de résultats de recherche Divi
Composition of a Divi search results page
  • A - The dynamic title of the page
  • B - The results of the Internet user's search in the form of thumbnails
  • C - A new section with a title
  • D - A possibility to restart the search if the first one was unsuccessful
  • E - Other elements or calls to action, i.e. content that you would like to put forward on this page...

And if we look at this layout in grid version, these elements could be set up using these modules:

Layout Page de Recherche en version Grille
Layout of a Search Page in Grid version
  • A - The dynamic title of the page = Text module
  • B - The results of the user's search in the form of thumbnails = Blog module
  • C - A new section with a title = Text module (again)
  • D - A possibility to restart the search if the first one was unsuccessful = Search module
  • E - Other elements or calls to action, i.e. content that you would like to put forward on this page... = all the modules you want!

Did you know that you can test Divi for free? Go to this page and click on "TRY IT FOR FREE

3 - Creating the search page template with the Theme Builder

To customize this dynamic page, there is only one way: use the Divi Theme Builder ! Here's how to do it:

Construire la template Page de Résultats
Building the Results Page template with the Divi Builder
  1. Go to the Divi > Theme Builder
  2. Click on "Add a new model".
  3. Assign the template to it "Search results
  4. Validate by clicking on Click on "Create a model".
  5. Click on "Building a customized body

3.1 - Building the layout of the search result page

Once the template is created, you just have to design the page without forgetting the essential modules:

Ajouter un titre dynamique
Add a dynamic title within the results page template
  1. Within the layout, insert a new line (also called "row")
  2. Then insert a Text module
  3. In the Content tab of the Text module, click on the database icon to use the dynamic content proposed by Divi
  4. Choose "Post / Title of the archive
Titre Dynamique - suite
Adding the dynamic title - continued
  1. This dynamic title will show : "Your dynamic publication title is displayed here". Do not attempt to change its text.
  2. However, you can change its appearance from the Style tab. Feel free to change its size, color, font, etc. to suit your taste.

3.2 - Showing search results

When the user enters a keyword using the magnifying glass, the native WordPress system will find results for them. Here's how to make them appear on your search results page:

Ajouter un module Blog
Add a Blog module to display search results
  1. Add a new row
  2. Add the Blog module
  3. In the parameters of this module, in the tab Contenttab, select YES for the option "Message for the current page.
  4. In the tab Content > Itemstab, you can define what you want to display.
  5. Then, on the Style > Modeltab, you can choose the model Grid which is much nicer than the Full screen template
  6. Finally, still from the Style tab, you can use all the options at your disposal to design the appearance of this module (color, size, shadow, animation, etc.).

3.3 - Propose to renew the research (optional)

Imagine that your reader didn't find what he was looking for on his first search, you can improve his experience by offering him to repeat this action without having to go through the magnifying glass icon again. This part is optional, but if you wish, here is how to do it:

Ajouter un nouveau Titre
Add a new title
  1. Add a new section
  2. Insert a Text module to explain to the user that he can renew his search.
  3. For example "Start a new search".
Ajouter le module Chercher
Add the Search module to the template
  1. Below, add a Search module
  2. In the parameters of this module, from the Contenttab, you will be able to enter the placeholder text (i.e. the text present by default in the search bar). For example: What are you looking for?
  3. From the Contents tab > Exceptionsthis module allows you to exclude certain contents from the results, for example pages, articles or certain categories of articles. Unfortunately, you can't exclude specific URLs, we'll see later in this article how to do it...
  4. Then, in the Style tabyou can define the appearance of the search bar (color, etc.)
  5. Now your search bar is ready.

3.4 - Adding calls to action (optional)

Your search results page is now functional, but there's nothing to stop you from adding various calls to action to encourage users to visit other pages or discover your store's top products!

After all, this page belongs to you and you can do whatever you want with it!

Visuel de la Page de Recherche personnalisée
Visual of the Custom Search Page
  1. Add for example a row with buttons, or your last 3 blog posts, or a contact form...
  2. Save your model.
  3. Exit the template and make sure to save again in the builder theme...

4 - Configure the Google Analytics "Site Search

At the beginning of the article, I told you that 348 people visited my search results page last month... If I know this number, it's because I activated a small option in my account Google Analytics.

If you also want to collect this type of statistics, you must activate it...

In addition to knowing the number of visitors who use your internal search engine, you will also know the keywords that have been entered in this search bar... This is therefore important information that can tell you the needs of your visitors.

Here's how to enable this feature:

Activer le suivi Site Search de Google Analytics
Enable Google Analytics Site Search tracking
  1. Go to the Administration tab of your Google Analytics account
  2. Select your account
  3. Select your property
  4. Click on View settings
  5. At the bottom of the page, activate the Site Search Tracking
  6. In the Parameter query field, enter " s". This is the parameter used in the URL by WordPress sites when users do a search.
  7. Save it.

That's it, from now on, your Google Analytics account will record visits and queries to this page (see the official documentation for configure Site Search).

5 - Exclude certain pages from the search

Finally, to perfect this page, you can exclude certain search results on a case by case basis. For example, if your site has private pages or pages that are of no interest to the user (shopping cart page, my account page, etc.) you could decide to exclude them from the results.

For this, you can use the free extension Search Exclude.

Exclure certains résultats
Exclude certain results from the search

This extension is very easy to use:

  • You just have to install it and activate it...
  • Go to the list of your pages or articles
  • Click on Quick Edit
  • Check the option Check the "Exclude from Search Results" box. if you do not want this publication to appear in the search results page of your site.
Search Exclude Option

If you want to exclude some pages without using a plugin, just add some lines of code, read this article.

6 - In conclusion...

Now you're the proud owner of a great search results page and it only took you a few minutes!

You can also download a free pre-built template for create your search result page more quickly (available on the official blog).

Did you already customize it? Do you have any other ideas to improve this page? Tell us in comments.

Page Result Divi Pin
Page De Recherche Pin

Want to customize Divi like a pro? Check out all the tutorials!

Result Page Divi

1,688 words

7

You should like it too:

Page d’erreur 404 personnalisée : avec et sans le Divi Thème Builder

Custom 404 error page: with and without the Divi Theme Builder

Have you thought about customising your site's 404 error page? No ? Well, you should: not only is it easy to do, but it could also lower your bounce rate! The idea is to keep the user who passes through your site on your site. Discover the step by step tutorial + video.

Appliquer des masques et des formes sur vos images avec Divi

Apply masks and shapes to your images with Divi

Masks make your images look more graphic and give your layout an original look. Did you know that you can easily create them using the Divi Visual Builder? I show you how in this tutorial and in this video.

17 Commentaires

  1. Jess

    Bonjour,

    Merci pour ce tutos ma page recherche est bien plus belle ! Par contre je rencontre un soucis avec le module « chercher », mon site est un site de vente en ligne, j’ai configurer le bouton recherche dans le menu pour avoir uniquement la liste de mes produits avec les termes rechercher mais quand j’utilise le module « chercher » cela ne me retourne aucun résultat. Y aurait-il quelque chose que j’ai oublié de faire ?

    Merci d’avance

  2. Lycia Diaz

    Salut Jess. Il faut regarder au niveau des paramètres du module peut-être ?

  3. lucquin

    Bonjour,

    Merci pour le tuto,

    Comment afficher le prix de mes produit sur la page de recherche ?

  4. Lycia Diaz

    Hum Lucquin c’est une bonne question…

  5. Lucas

    Bonjour,

    Merci pour ce tuto ! Cependant après avoir suivi les étapes du tutoriel, je me rends compte que lorsque j’effectue une recherche sur mon blog divi, l’apparence n’a pas changé. C’est-à-dire que l’apparence de la recherche de mon blog se décrit de la façon suivante : une colonne à droite et une colonne à gauche contenant les articles de ma recherche les un à la suite des autres. Il s’agit de la recherche de base de divi. Or, en suivant votre tuto, j’ai bien créé un module de recherche avec un modèle de blog en grille mais ce dernier ne figure pas comme vous.

    Y-a-t-il un moyen d’éviter d’obtenir la colonne à droite et avoir le même affichage que vous ? J’imagine qu’il y a une configuration à effectuer pour modifier l’apparence de la recherche en amont.

    Je ne sais pas si vous voyez ce dont je parle. En espérant que vous puissiez m’aider 🙂

  6. Bk

    Bonjour, je souhaite n’afficher les résultats de recherche que d’une seule page.
    J’ai listé des documents PDF à télécharger et je souhaite que les internautes puissent rechercher rapidement le document sur cette même page. Comment faire ? Merci !!

  7. Lycia Diaz

    Salut BK, je ne sais pas. Si tu utilises le plugin d’exclusion ça devrait marcher mais du coup, ça va marcher pour tout ton site et non que pour la page que tu désires.

  8. Lycia Diaz

    Salut Lucas, heu tu as peut-être mal paramétré ton modèle dans le Thème Builder. Il faut l’attribuer à la bonne page et tu dois aussi sauvegarder 2 fois pour que ça fonctionne.

  9. Romano

    Hello, j’ai le même problème que Lucas, et j’ai vérifié le paramétrage qui pointe sur la pages « Résultats de recherche ». Donc ok, enregistré deux fois, mais rien à faire : la recherche tombe toujours sur la page WordPress…
    Merci de ton retour !

  10. Romano

    Rebonjour,
    Cela fonctionne maintenant, il fallait que je me log une nouvelle fois 😉
    Merci pour cette page !

  11. Lycia Diaz

    Ah super

  12. Lucas

    Bonjour,

    Je ne parviens pas à vous écrire un email alors j’écris ici.

    Je souhaite intervenir sur mon précédent commentaire. L’affichage de la recherche s’est finalement mise à jour.
    Il a fallu que je me déconnecte de WordPress, je ne sais pas pourquoi mais en tout cas je confirme que votre tuto a bien fonctionné.

    Veuillez m’excuser pour ce double commentaire.

    Cordialement.

  13. Lycia Diaz

    Super Lucas, merci du retour !

  14. cindy

    Bonjour Licia, j’ai un souci j’ai bien la barre de recherche sur mon site mais lorsque je fais une recherche il n’y a aucun résultat. Je ne comprends pas pkoi. Pouvez vous m’aider ?

  15. Lycia Diaz

    Salut Cindy. As-tu essayé plusieurs requêtes pour voir si rien ne marche, car ça me parait bizarre, le moteur de recherche natif de WordPress a toujours bien fonctionné.

  16. Mike

    Hi, helpful blog, thanks. How do I edit the existing search results page? I can’t see the page in the Pages section of WordPress. And do I need to create a new page for ‘no results’? Currently, if there are no results, my users get a blank page. Cheers

  17. Lycia Diaz

    Hello Mike ! No, you just have to create a Search Result Page like that… if there is no result, you might have a page with « no result found »… you should don’t have a blank page, it seems to be wrong, I think…

Soumettre un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Je souhaite recevoir les news du blog Astuces Divi !

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.

Pin It on Pinterest

Shares
Share This