Android

WordPress Algolia – Add Existing Indices to Your Search Engine

Wordpress

In this article, we are going to give an overview of “How you can add existing indices to your website search engine.

Add All Data to Algolia (Create New Indices) :

If you want to use algolia in your WordPress website or WordPress blog, You just need to install Algolia WordPress Plugin.

You can simply download a plugin from HERE.  Or else just go to Dashboard -> Plugins -> Add Plugin and search for “Search by Algolia – Instant & Relevant results.

You can find an installation guide from its documentation, useful filter and hooks as well. After installing the plugin you can able to see “Algolia Search” tab on Admin dashboard sidebar.

Wordpress Algolia - Add Existing Indices to Your Search Engine - Programming School

After installing, If you don’t have algolia account you need to create one to push your website data to algolia.

After creating algolia account you can find Application IDSearch-Only API Key, Admin API Key and Index Name Prefix. As shown in below image.

Wordpress Algolia - Add Existing Indices to Your Search Engine - Programming School

In your Dashboard -> Algolia Search -> Settings, You have to add your Algolia account credentials shown in below image.

Wordpress Algolia - Add Existing Indices to Your Search Engine - Programming School

In Dashboard -> Algolia Search -> Autocomplete click on Enable Autocomplete and you can click index from configuration section as shown in below image.

Wordpress Algolia - Add Existing Indices to Your Search Engine - Programming School

In Dashboard -> Algolia Search -> Search Page you will need to select Search result as shown in below image. (Choose as per your requirement)

Wordpress Algolia - Add Existing Indices to Your Search Engine - Programming School

That’s It. Now You can use algolia in your WordPress website or blog for Instant & Relevant results.

Use Existing Indices :

For this, You will need to add

Here is my <script> in footer.php file,

You can change the code as per your requirement.

Add below scripts in your <head> Tag.

And here is the code for search input in my <header>  tag,

you can add some styling to it as per your requirement.

Conclusion : 

After going through this article, you can able to use algolia search in your WordPress website or blog.

Thank You.

Cheers.

Happy Coding!

LEAVE A REPLY

Please enter your comment!
Please enter your name here