Getting Started

This section explains how to set up Ajax Live search to work with your theme.

If you are unable to set it up then please consider using it with our free brendah theme which comes preconfigured to work with the plugin.


To install this WordPress search plugin;

  1. Visit your admin dashboard.
  2. Click on plugins > add new > upload.
  3. On the next screen, upload the file you downloaded after purchasing a license.
  4. Wait for WordPress to install the plugin then click on activate. Thats all you have to do!

Setting up the environment

Before you can start searching, Ajax Live Search will first need to index your posts.

During this process, your site may slow down but after a few minutes everything should be indexed and back to normal.

Posts will only appear in search results after they have been indexed. You should therefore be a little patient incase you are not seeing some posts in the search results.

Do the following to speed up the indexing process in case you have hundreds of posts and pages.

  1. Increase your memory limit and maximum excecution time.
  2. Next, visit the ajax live search settings page then increase the value of batches to index per session.
  3. Continue using your website like normal. Soon everything should be indexed.

Adding compatibility to your theme

To use ajax and live search on your WordPress blog; you will have to do the following:-

  1. Open the theme editor. It is found on on the appearance tab of your administration menu.
  2. Next, select your active theme and locate the file that renders search results. This is usually named search.php. I
  3. Click to edit.
  4. Add the following code immeadiately before the line that says …
if ( have_posts() ) :

Add the following code immeadiately before the above snippet;

if ( function_exists('als_ajax_init') ) {			

You can also add the above code in any template that you want ajax and live search to be enabled in. This includes;

  1. Index.php
  2. Page.php
  3. Single.php
  4. Archive.php

Next; scroll down the page until you see a line that resembles the following;

get_template_part( 'template-parts/content', get_post_format() );

template-parts/content is the file used to render a single post in archives. Some themes use different names for it including;

  1. template-parts/content-search
  2. content-search
  3. content
  4. etc

If you can't figure it out then send an email to your theme developer and they should tell you exactly which file it is that you need.

Finally, open the ajax live search settings page and click on the searching tab. Enable ajax and live search then scroll down to the template file field and insert the name that you copied in the above step.

If you are unable to make this work; please send us a message. Please note that we only offer installs for premium users.

A few more tips

  1. Make sure that you have atleast 10 posts published on your website. This is because we dont weigh any word that appears in more than 50% of the published posts. As a result; you wont get any results if you have less than 3 posts published on your website.
  2. Enable query caching to get the most of this plugin. This ensures that subsequent searches never hit your database reducing server response time.
  3. Use Google as an autocomplete engine to ensure that your server load remains as low as possible.
  4. Edit the autocomplete and custom snippets appearance to match that of your theme.
  5. Giving your titles and permalinks more weight ensures that the most relevant results appears at the top of the result pages.
  6. Query correction will only work if you have lots of previous searches.



You can search using the operators below.

  1. + A leading plus sign indicates that this word must be present.
  2. - A leading minus sign indicates that this word must not be present in any of the returned results.
  3. > Indicates that this word should be given more weight.
  4. ~ Indicates that this words weight should be negated but not removed. See 2 above.


Viewing search statistics

Ajax live search shows you what your visitors are searching for. This information is a goldmine when hunting for new content ideas.

To view the searches; click on the ajax live search link on your admin menu.

Next; click on the statistics tab and you will be able to view a couple of statistics including;

  1. Most Popular searches.
  2. Popular searches with few results.
  3. Searches with the most results.


Leave a Reply

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