How to Add Autocomplete Search in WordPress 1

How to Add Autocomplete Search in WordPress

When using a search engine like Google, you are likely to be presented with some search suggestions before entering the entire search query. This is called autocomplete search, A great feature that helps users find what they’re looking for quickly and saves them valuable time in the process.. In turn, this can only add to the overall user experience and make them stay on your website longer.

Now WordPress comes with the ability to add a search function by default, and depending on the theme you are using, you can add it to many different areas of your site and add a search bar to your WordPress. eg menu. However, when it comes to features like “autocomplete”, you should specifically use a WordPress search plugin that offers autocomplete functionality.

This time, we will show you how to easily implement this handy feature on your WordPress site and make the search process much more convenient for your visitors. Without further ado, here it goes.

Adding AutoComplete Search in WordPress with a Plugin

As we mentioned at the beginning, to add the autocomplete search functionality to your WordPress site, you need to install a plugin that supports this feature. Such a plugin Ajax Search Lite – her a freemium plugin you can use to add a live search bar to your site. Besides accessing Google’s autocomplete feature, you will be able to add your search box to any page, post or custom post type, use custom filter boxes (checkbox filters) for categories and post types, and more.

Ajax Search Lite

there is also professional version of the addon (available for $36), which comes with some additional advanced options. These include searching in category, tag and date filters, searching comments, accessing 4 different layouts and 100+ different themes etc.

Install Plugin and Set Autocomplete Options

After installing and activating the plugin, to go Ajax Search Lite (available in your admin control panel) and find General options tab. At that time, set course in this direction Autocomplete and Suggestions.

Once there you will see that Autocomplete search option is on by default. The same goes for the Google search keyword suggestions option.

Turn On Google Search Autocomplete

There are a few more options you can set here, such as the maximum keyword length, the maximum number of keywords, and the language of Google suggestions.

“Save options!” Press the button when you’re done.

If you want to determine which content types appear in your autocomplete results, be sure to visit the Resources and Basics tab. You’ll be able to choose everything from navigation menus to custom CSS and templates. Also, you will do all this with the help of a neat drag and drop feature.

Resources and Basics

Additionally, you can use the plugin in the header, permalinks, post excerpt, custom fields, etc. you can set it to allow (or disallow) search.

There are many other useful settings you can use to decide whether you want to include images in search results, such as Image Options, Layout Options (for completely customizing the look of your search box and results), Advanced Options, and more. .

To learn more about all these options and how to use this handy plugin in more detail, we recommend that you check out our article How to add AJAX live search in WordPress.

Adding the Autocomplete Search Box to Your WordPress Site

Once you’ve adjusted all the settings to your preferences, it’s time to add your Ajax autocomplete search to your site.

To do this, you must first Copy the “search shortcode” (located just above the plugin’s options).

Search Shortcode

After copying this shortcode, Go to the page/post where you want to add your search.

Next, find the shortcode block Using the (+) or “Add block” button.

Add Shortcode Block

Simply paste your shortcode into the blockand now you are ready.

Add Shortcode

Be sure Publish/Update your page/postand then go ahead and see what your autocomplete search looks like live.

This is what our autocomplete search bar looked like when we started typing our keyword.

Autocomplete Search Preview

Autocomplete Search – Best Practices

Last but not least, it can also be a good idea. Mention some best practices to consider when implementing autocomplete search on your site. Here are some ways to make your autocomplete search look more visually appealing and user-friendly as a whole.

As a result

The autocomplete search feature can greatly contribute to the overall user friendliness of your site as it allows users to find what they need quickly and effortlessly. With the help of the right plugin, adding autocomplete search in WordPress is as easy as it gets. We recommend using a plugin like AJAX Live Search for this task, as it comes with a wide variety of autocomplete and other live search options and allows you to deeply customize the look and function of your search. Also, the autocomplete option is already available in the free version of this plugin, so you don’t have to pay any money to add this practical option to your WordPress site.

Support our work ❤️

If you enjoyed this article, consider leaving a tip to help us keep publishing great content.

Secure payment on PayPal
Moyens I/O Staff is a team of expert writers passionate about technology, innovation, and digital trends. With strong expertise in AI, mobile apps, gaming, and digital culture, we produce accurate, verified, and valuable content. Our mission: to provide reliable and clear information to help you navigate the ever-evolving digital world. Discover what our readers say on Trustpilot.