Searching for the best AJAX search WordPress plugin? đ
Adding AJAX-powered live search to WordPress is a great way to improve your siteâs user experience (UX) and boost content discoverability.
In this post, youâll learn step-by-step how to set up AJAX search in WordPress using a completely code-free solution.
In fact, you can be up and running in just a few minutes, while still having access to functionality to refine how your siteâs AJAX search functions.
đ All you need to do is:
- Install the Otter Blocks plugin.
- Add the Search block where you want your AJAX WordPress search box to appear and enable the Live Search toggle.
- Customize the AJAX live search functionality as needed, such as configuring it to only search blog posts but not pages.


đ If you want to jump straight to the tutorial, you can click this jump link.
Otherwise, weâll start with a quick rundown on how AJAX search works and some of the different ways to set up AJAX search WordPress functionality.
What is AJAX search for WordPress?
Youâll likely use live search functionality on a day-to-day basis. For instance, all major search engines and video sites such as YouTube provide this type of feature.
You start typing in the search box and you instantly see a list of suggested queries (or suggested results) â no page load needed.


While WordPress has its own search bar, it doesnât use AJAX by default. Instead, users enter a search term in the box, hit enter, and a new page with results loads.


To add live search to your site, youâll need the help of a plugin, which is what this post is all about.
The benefits of live AJAX search in WordPress
Anything you can introduce that enhances UX will offer value to your site. However, live AJAX search for WordPress can give your users something special:
- You can provide a way for users to âself-serveâ their needs. Theyâll have a fast way to search your entire site and find the right page.
- Interactive elements can provide a greater connection between your site and users. This is because you can provide relevant search results faster, and without the need for extra button clicks.
- You can also keep page loading times down to a minimum, as live AJAX search doesnât need to make further HTTP requests or load other pages.
Why a manual coding solution for live search might not be best
Given that AJAX uses JavaScript, you might consider ârolling your ownâ solution using the programming language.
This is a fine idea in theory, but wonât be the best method to add live AJAX search to WordPress. Hereâs why:
- First, you can only create a solution thatâs as good as your skills. If you donât have expert-level JavaScript knowledge, this will show in the results.
- In addition, youâll also need to know about WordPressâ file structure, template structure, and much more. Thereâs a lot of cogs that make up WordPressâ wheel.
- Even if you do have the necessary skills to code a live search solution, youâll also need time and money to develop and implement it. This can be hard to come by, especially if development is not your primary employment.
- If you need to troubleshoot your manual solution, this can eat further into your time, money, and resources. You could be biting off more than you can chew.
Instead, thereâs a better way to implement the right functionality within WordPress: plugins. Letâs take a look at how this works next.
Use an AJAX search WordPress plugin instead
For most people, using an AJAX search WordPress plugin is a much better option.
While there are plenty of AJAX search WordPress plugins to choose from, not all are created equal. For example, some plugins are limited when it comes to styling options or controlling what content to search in.
For that reason, weâre going to use the Otter Blocks plugin for this tutorial.
As the name suggests, Otter Blocks is a collection of elements for the native WordPress Block Editor.
In terms of AJAX search functionality, the most relevant feature is the Search block.
It lets you choose which post types to search in and fully customize the design of your search box. You can add it to any part of your site, including posts, pages, sidebars, and more.
Beyond the AJAX search WordPress functionality, Otter Blocks gives you a few extra ways to spice up your layouts and design:
- You can add headings with a greater level of customization than youâll get by default.
- Thereâs the option to build a responsive section that includes advanced customization and space for six columns.
- Youâll be able to add stunning animations such as Lottie effects and flip cards.
- If you sell products through your site, Otter Blocks includes pricing tables, the ability to implement âadd to cartâ buttons, business hours, and much more.
In fact, Otter Blocks provides additional functionality for all Blocks on offer â even native ones. For example, you can set visibility conditions, custom CSS, and more from the typical Block Editor interface.
How to use Otter Blocks to add live AJAX search to WordPress
Youâll only need a few steps to set up Otter Blocks to add live AJAX search to WordPress. Letâs begin with the installation process:
- Install and activate Otter Blocks
- Enable live AJAX search for WordPress within Otter Blocksâ settings
- Tweak the settings to refine the search experience on the front end of your site
1. Install and activate Otter Blocks


First off, youâll need to install Otter Blocks and activate it for your website. There are plenty of ways to do this, but weâd repeat what is already in our other article on the ThemeIsle blog.
This will show you how to install both the free and premium versions of Otter Blocks. However, for this post, youâll need the premium version as this gives you live search functionality.
2. Enable live AJAX search for WordPress within Otter Blocksâ settings
Once youâve installed the plugin, use the block inserter to add the Search block from Otter Blocks.


After you do this, it will add a form field and a button to your page layout.
This implements the core search functionality, but this isnât live AJAX search in WordPress.
In its default setup, it will act as the typical WordPress search does.
To enable the AJAX search WordPress feature, turn on the Enable Live Search toggle in the right-hand sidebar:


3. Tweak the settings to refine the search experience on the front end of your site
Once you have live search functionality on your site, you can refine it in a number of ways.
Of course, there are a number of cosmetic and UX options.
For instance, you can change the button position, whether you use a label for the search box, and tweak the colors, animations, and borders for the search section:


From there, you can also give the search its boundaries of where to look on your site by choosing which post types to search in.
For this, youâll use the Search In box on the right-hand sidebar:


This enables you to add âentitiesâ for where you want the search to operate.
For example, you could choose to only search within your postâs content, or among your storeâs products.
If you leave this field empty, Otter Blocks will search your entire siteâs content.
Set up AJAX search WordPress functionality today đŻ
If you can provide greater interactivity on your website, this could translate into a better UX all around. Live AJAX search in WordPress is a fantastic way to offer users the ability to find what they need in real time.
However, WordPress doesnât offer this by default. Instead, you can use Otter Blocks to add this onto your site. Thereâs no code involved, and you get much more functionality than just live AJAX search.
đ While Otter Blocks is a free plugin, the premium version provides the ability to set up live AJAX search in WordPress, among other options.
Do you still have any questions about how to set up AJAX live search on WordPress? Ask us in the comments below!
FREE GUIDE
4 Essential Steps to Speed Up Your WordPress Website
Follow the simple steps in our 4-part mini series and reduce your loading times by 50-80%. đ
Yay! đ You made it to the end of the article!
