Home » Blog » How to Add Auto Live Search Capability on Divi’s Search Module for Free

Several plugins promises to give better search results but either it’s a paid plugin or integrating it with Divi’s search module proves to be difficult.

And add this simple code ( data-swplive="true" )

Divi’s Search module is nice for the fact that we can create several styles on it. But it misses one functionality that makes people look for a another similar plugin, the ability to show live results in real time (see 1st image attached). And because of this, users ditch out this module to find a better alternative.

But today, we are going to celebrate the fact that we can now use it with the functionality that we have been looking for. And to point out, the solution I found out is for free. We don’t have to pay a single dime to make Divi’s search module provide live results when searching. Without further ado, here’s how to activate the functionality.


Activate the SearchWP Live Ajax Search

This plugin will give us the code that we will add later inside Divi’s search.php file. Once the the plugin is activated, click the “view details” link and look for the code.

Copy the code and let’s add it on Divi’s template files


The code is located in Divi/includes/builder/module/Search.php. Make sure that you have enough permission to edit the file. Don’t worry as Divi won’t overwrite edited module files.

In line 399, you can see this code…

input type="text" value="" name="s" class="et_pb_s" %7$s=""

Next, append this line and add the code we just copied earlier. It will now look like this,

input type="text" value="" name="s" class="et_pb_s" %7$s="" data-swplive="true"

After that, saved the changes.

Now, if we go back to the search field. Live datas are already showing. (see image below)

So that’s how you add a live search capability for Divi’s Search module.

Share This

Share this post with your friends!