Using the search module, you can place a online form search anywhere on your site. This online form search will allow your visitors to search all of your website 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 forms search 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 into Divi Builder. Once the Divi theme installed on your website, you will notice a button Use Divi Builder above the post editor whenever you create a new page. Click on this button to activate Divi Builder and access all the Divi Builder modules. Then click on the button Use Visual Builder to start the generator in visual mode. You can also click 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 rows. If you are starting a new page, remember to add a row 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 you can also type the word "search" and then click enter to search and automatically add the search module! Once the module is added, you will be greeted by the module options list. 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'll show you how to add a search module to be a primary 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 below. Below the search module is a blog module using the grid layout.

example blog with search form divi.jpg

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

Update the search module settings as follows:

Content options

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

Design options

Input field background color: # f8f8f8
Placeholder Color: # 888888
Input font size: 16px
Input text color: # 888888
Height of entry line: 1em
Custom padding: 20px Top, 20px Bottom

divi search configuration content.png

Save settings

Now come back to change the width of the row containing your search module. On the Design tab of the line settings, give the line a custom width of 300px. This will keep the search module compact and focused on the page.

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 will find all the module styling 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 settings that you can use to tweak anything.

divi search design.png

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 placeholder text exists inside the field. If you've adjusted the background color of the field, you can also adjust the color of the placeholder text to make sure it's 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 are working with a light 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 great 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 using bold, italics, capitals and underline options.

Input font size

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 directly enter the value of the desired text size in the input field to the right of the slider. The input fields support different measurement units which means you can enter "px" or "em" depending on your size value to change its unit type.

Input text color

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

Letter spacing

Letter spacing 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 measurement units which means you can enter "px" or "em" depending on your size value 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. entry to the right of the cursor. The input fields support different measurement units which means you can enter "px" or "em" depending on your size value to change its unit type.

Button and border color

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

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 great 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 using bold, italics, capitals and underline options.

Button font size

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

Button text color

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

Spacing of the letters of the button

Letter spacing 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 measurement units, which means you can enter "px" or "em" depending on your size value 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 measurement units which means you can enter "px" or "em" depending on your size value 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 column width. If you want to further restrict the maximum width of the search bar, you can do so 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

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

Custom padding

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

Advanced Options of the Research Module

On 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 any of the module's many elements. You can also apply custom CSS classes and IDs to the module, which can be used to customize the module in your child theme's style.css file.

divi advanced option module search.png

CSS ID

Enter an optional CSS ID to use for this module. An ID can be used to create a custom CSS style or to link 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 custom CSS styling. 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 to your website using the Divi theme options or the Divi Builder page settings.

Custom CSS

Custom CSS can also be applied to the module and any of the module's internals. In the Custom CSS section, you will find a text field where you can add custom CSS style sheets directly to each element. CSS entries in these settings are already wrapped in 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 deactivate your module on tablets, smartphones or desktops individually. This is useful if you want to use different mods on different devices, or if you want to simplify the mobile design by eliminating certain elements from the page.

[vc_row center_row = "yes"] [vc_column width = "1/2 ″] [vcex_button target =" blank "layout =" expanded "align =" center "font_family =" Raleway "font_weight =" 700 ″ style = "flat" custom_background = "# 18b69d" custom_hover_background = "# 118d7a" custom_color = "#ffffff" custom_hover_color = "#ffffff" icon_right = "fa fa-download"] DOWNLOAD THE DIVI THEME [/ vcex_button] [/ width_column] [»vc_column] [» 1/2 ″] [vcex_button url = "https://www.elegantthemes.com/affiliates/idevaffiliate.php?id=23065&url=40632&tid1=tutorials" target = "blank" layout = "expanded" align = "center" font_family = "Raleway" font_weight = "700 ″ style =" flat "custom_background =" # c4226e "custom_hover_background =" # 8d184f "custom_color =" #ffffff "custom_hover_color =" #ffffff "icon_right =" fa fa-download "] DOWNLOAD TEMPLATES DIVI [/ vcex_button] [/ vc_column] [/ vc_row]

Other Divi tutorials