Skip to Main Content

Divi tutorial: How to use the Search module

Divi: the easiest WordPress theme to use

Divi: The best WordPress theme of all time!

With over 600.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

By using the search module, you can place a search form anywhere on your site. This search form will allow your visitors to search all of your website's content, including all pages and blog posts. This gives you the functionality of the WordPress search widget with the flexibility that Divi Builder offers. You can not only control the location of search forms on the page, but also customize its design.

How to add a search module to your page

Before you can add a search module to your page, you must first jump to Divi Builder. Once the Divi theme is installed on your website, you will notice a button Use Divi Builder above the publisher each time you create a new page. Click this button to activate Divi Builder and access all Divi Builder modules. Then click on the button Use Visual Builder to start the generator in visual mode. You can also click on the button Use Visual Builder when you browse your website in the foreground if you are connected to your WordPress dashboard.

divi builder

Once you have entered Visual Builder, you can click the gray plus button to add a new module to your page. New modules can only be added inside the lines. If you start a new page, do not forget to add a line to your page first.

divi.png research module

Locate the search module in the list of modules and click on it to add it to your page. The list of modules is searchable, which means that you can also type the word "search", then click on enter to search and automatically add the search module! Once the module is added, you will be greeted by the list of options of the module. These options are separated into three main groups: Contents , Design et Advanced .

Use Case Example: Adding a Custom Search Module to a Full-width Blog Page

For this example, I will show you how to add a search module to be a main call to action at the top of a blog page. This allows users to easily search your blog content without any clutter.

This page has a full width header at the top with the search module directly underneath. Under the search module is a blog module using the layout of the grid.

example blog with search form divi.jpg

Using Visual Builder, add a new standard section to the blog page with a fullwidth (1 column) line. Then insert the search module in the row.

Update the search module settings as follows:

Content options

Reserved text: Search our blog ...
Hide the button: YES

Design options

Background color of the input field: # f8f8f8
Color of the placeholder: # 888888
Input font size: 16px
Input text color: # 888888
Height of the input line: 1em
Custom padding: 20px Top, 20px Bottom

divi search configuration content.png

Save settings

Now, go back to change the width of the line containing your search module. On the Line Parameters Design tab, set the line to a custom width of 300 px. This will keep the search module compact and centered on the page.

Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

configuration divi.png width

That's all !

Search content options

In the content tab, you will find all the content elements of the module, such as text, images and icons. All that controls what appears in your module will always be found in this tab.

module search divi contenu.png

Placeholder text

Type the text that you want to use as a placeholder for the search field.

Hide button

If you enable this option, the Search button will be hidden.

Exclude Pages

If you enable this option, the pages will be excluded from the search results.

Exclude items

Enabling this option will exclude messages from search results.

Exclude categories

Choose the categories you want to exclude from search results.

Admin Label

This will change the module label in the constructor for easy identification. When you use the WireFrame view in Visual Builder, these labels appear in the module block of the Divi Builder interface.

Search Design Options

In the Design tab, you'll find all the module's style options, such as fonts, colors, sizing, and spacing. This is the tab you will use to change the appearance of your module. Each Divi module has a long list of design parameters that you can use to modify anything.

divi search design.png

Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

Background color of the input field

Here you can change the background color of the search bar.

Placeholder Color

Before the search field is used, the text of the placeholder exists inside the field. If you have adjusted the background color of the field, you can also adjust the color of the placeholder text to make sure it is readable.

Text color

Here you can choose the value of your text. If you are working on a dark background, your text should be on. If you work with a clear background, your text should be dark.

Text orientation

This controls how your text is aligned in the module.

Entry Police

You can change the font of your input text by selecting your desired font from the drop-down menu. Divi comes with dozens of large fonts powered by Google Fonts. By default, Divi uses the Open Sans font for all the text on your page. You can also customize the style of your text by using the bold, italic, uppercase, and underlined options.

Size of the input font

Here you can adjust the size of your input text. You can drag the range slider to increase or decrease the size of your text, or enter the value of the desired text size directly into the input field to the right of the slider. The input fields support different units of measurement, which means that you can enter "px" or "em" depending on the value of your size to change its unit type.

Input text color

By default, all Divi text colors appear in white or dark gray. If you want to change the color of your input text, choose the desired color in the color picker using this option.

Letter spacing

The spacing of the letters affects the space between each letter. If you want to increase the space between each letter in your input text, use the range slider to adjust the space or enter the desired spacing size in the input field to the right of the slider. The input fields support different units of measurement, which means that you can enter "px" or "em" depending on the value of your size to change its unit type.

Height of the line

Line height affects the space between each line of your input text If you want to increase the space between each line, use the range slider to adjust the space or enter the desired spacing size in the field. entered to the right of the cursor. The input fields support different units of measurement, which means that you can enter "px" or "em" depending on the value of your size to change its unit type.

Button and border color

This will change the background and color of the search button border.

Button font

You can change the font of your button text by selecting the desired font from the drop-down menu. Divi comes with dozens of large fonts powered by Google Fonts. By default, Divi uses the Open Sans font for all the text on your page. You can also customize the style of your text by using the bold, italic, uppercase, and underlined options.

Button font size

Here you can adjust the text size of your button. You can drag the range slider to increase or decrease the size of your text, or enter the value of the desired text size directly into the input field to the right of the slider. The input fields support different units of measurement, which means that you can enter "px" or "em" depending on the value of your size to change its unit type.

Button text color

By default, all Divi text colors appear in white or dark gray. If you want to change the color of your button text, choose the desired color in the color picker using this option.

Spacing of the letters of the button

The spacing of the letters affects the space between each letter. If you want to increase the space between each letter in your button text, use the range slider to adjust the space or enter the desired spacing size in the input field to the right of the slider. The input fields support different units of measurement, which means that you can enter "px" or "em" depending on the value of your size to change its unit type.

Height of the line of the button

Line height affects the space between each line of your button text If you want to increase the space between each line, use the range slider to adjust the space or enter the desired spacing size in the input field located to the right of the cursor. The input fields support different units of measurement, which means that you can enter "px" or "em" depending on the value of your size to change its unit type.

Maximum width

By default, the maximum width of the search bar is set to 100%. This means that the search bar will be displayed at its natural width unless the width of the search bar exceeds the width of the parent column, in which case the search bar will be limited to 100% of the width of the column. If you want to further restrict the maximum width of the search bar, you can do this by entering the desired maximum width value here. For example, a value of 50% would limit the width of the search bar to 50% of the width of the parent column.

Custom margin

Margin is the space added to the outside of your module, between the module and the next item above, below, or to the left and right of it. You can add custom margin values ​​to one of the four sides of the module. To remove the custom margin, remove the value added from the input field. By default, these values ​​are measured in pixels, but you can enter custom measurement units in the input fields.

Custom padding

Fill is the space added inside your module, between the edge of the module and its internal elements. You can add custom fill values ​​to one of the four sides of the module. To remove the custom margin, remove the value added from the input field. By default, these values ​​are measured in pixels, but you can enter custom measurement units in the input fields.

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]

Advanced Options of the Research Module

In the Advanced tab, you'll find options that more experienced web designers might find useful, such as custom CSS and HTML attributes. Here you can apply custom CSS to one of the many elements of the module. You can also apply custom classes and CSS IDs to the module, which can be used to customize the module in the style.css file of your child theme.

divi advanced option module search.png

CSS ID

Enter an optional CSS identifier to use for this module. An ID can be used to create a custom CSS style or to create links to particular sections of your page.

CSS class

Enter the optional CSS classes to use for this module. A CSS class can be used to create a custom CSS style. You can add multiple classes, separated by a space. These classes can be used in your Divi child theme or in the custom CSS style sheet that you add to your page or website by using Divi theme options or Divi Builder page settings.

Custom CSS

Custom CSS can also be applied to the module and to one of the internal elements of the module. In the Custom CSS section, you will find a text field in which you can add custom CSS style sheets directly to each element. The CSS entries in these parameters are already wrapped in the style tags. So just enter the CSS rules separated by semicolons.

Visibility

This option allows you to control the devices on which your module appears. You can choose to disable your module on tablets, smart phones or desktops individually. This is useful if you want to use different modules on different devices, or if you want to simplify mobile design by eliminating certain elements of the page.

Other Divi tutorials

This article features 3 comments

  1. Hi, thanks for the article. I have a question, can the search form only be used for a section of a page? for example for the FAQ section, I would like to set up a search form limited to only the questions of the FAQ (+ 20 questions) in this way the user does not have to read them all but finds thanks to the search form only the ones with the keywords that he cares about. Thank you in advance for your answer.

  2. Thank you for this article, nice to delete the pages of the search module, but can you also exclude pages when you do a search with the magnifying glass of the header ?? Thank you

Leave a comment

Your email address will not be published. Required fields are marked with *

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Back To Top
20 shares
Share12
tweet2
Save6