Algolia integration: instant search and live listings

Integration 6 min read

The integration connects your site to your own Algolia account and gives you two things: search that answers while you type, and listing blocks that draw posts from the index with filters, sorting and pagination. It talks to Algolia directly, so there is no second plugin to install.

It replaces the WP Search with Algolia plugin, it does not need it.

We wrote this integration so you would not have to run a third party search plugin beside the theme. It holds its own credentials, calls the Algolia REST API itself, and does not detect, require or read anything from that plugin. If you have it installed for another reason, our side neither uses it nor conflicts with it.

#What it actually gives you

Search is the half people expect. The other half gets used about as often.

Instant search

The theme search panel switches into Algolia mode and answers while you type. The theme draws the rows in its own chrome, so results look like the rest of the site rather than like a search widget.

Live listings

A listing block and an Elementor widget that render content straight from the index, as a grid or a list, with a search field, filters, sorting and pagination. This is the surface people use to build an archive, a portfolio wall or a filtered catalogue, and it works whether or not you ever touch the search panel.

Both surfaces are answered on the server. The browser gets markup, never an Algolia client, an application id or a key.

#Where our part ends

Your Algolia account, your plan, your index settings and your ranking rules are Algolia's territory, and their documentation covers them properly. Ours is what happens with a working index: connecting, pushing your content into it, and the two surfaces that read it.

#Getting it running

Create an Algolia account

Sign up at algolia.com and create an application. The free plan is enough for most sites, and their pricing tells you when it stops being enough.

Copy your keys

In the Algolia dashboard, open Settings > API Keys, which their own guide walks through. You need three values: the Application ID, the Admin API key and the Search-Only API key.

Enter them in the theme

Theme Options > Algolia takes the application id, both keys and the index name. The admin key is what pushes your posts up. The search key is what reads them back. Both are stored as passwords and are never shown again in plain text.

Build the index

Use Rebuild index on the same page. Clear before rebuild wipes the index first, which is what you want after changing what gets indexed rather than for a routine refresh.

Point the theme at it

Search switches over in Theme Options > Navigation > Search, where Search Provider becomes Algolia. The listing block and the Elementor widget are available as soon as the index has content.

The keys are account credentials, so treat them like a password.

The admin key can write to and delete from your index. It stays on the server: no key of any kind is printed into the page or handed to a visitor's browser. If you ever paste one somewhere public, rotate it in the Algolia dashboard rather than leaving it live.

#Keeping the index current

Editing a post updates its record on its own. Publishing, editing, unpublishing, trashing and a scheduled post going live all keep the index in step, so ordinary writing never waits for a rebuild. A post that stops being public is removed from the index rather than left answering searches.

Scheduled reindex, on the same settings page, is the safety net for what automatic updates cannot cover: a bulk import, a database restore, or a change to what the index holds.

One thing goes stale quietly. A record stores the URL of the featured image as it was at indexing time, so replacing a post's image leaves the old one in search results until the next rebuild.

#Integrations are part of the theme

This integration is licensed with the theme, not on its own.

Integrations are premium functionality for customers running a Pro license of one of our themes. They are built against our themes and expect them, and we cannot support or take responsibility for what they do inside somebody else's theme. See how theme integrations work for the full picture.

#Common questions

Do I need a paid Algolia plan?

That depends on how much content you index and how many searches your visitors run, which makes it a question for Algolia's pricing rather than for us, and small to mid-sized sites usually stay inside the free tier.

Can I remove the Search by Algolia label?

The attribution is required on Algolia's free plan and their paid plans let you drop it, so whether you may remove it is a question about your plan rather than about the theme. The integration prints it through a hook that can be unhooked, and if you remove it while on a plan that requires it then that sits between you and Algolia, since we are not a party to your agreement with them and cannot carry that risk for you.

Search returns nothing at all

Check the index name first, because a name in the settings that does not match the index in Algolia produces exactly this while nothing else looks wrong, then confirm in the Algolia dashboard that the index actually holds records and run a rebuild if it does not. If the index has content and the site still finds none of it, the search key is the next suspect: an admin key alone will write happily and read nothing.

Sorting by date does nothing

Algolia sorts through index replicas, so newest and oldest read separate indexes that your plan has to allow and your account has to create, and until those replicas exist the query quietly falls back to relevance, which is why the page still shows results rather than an error. This one is not a theme setting and cannot be fixed from our side.

A filter shows no counts, or refining matches nothing

Facets have to be declared on the index before Algolia will count them and a rebuild declares them, so a filter that comes back empty almost always means the index was written before that filter existed and a rebuild brings the counts back.

Is my content sent to Algolia?

Yes, that is how a hosted search service works: the title, excerpt, content, URL, date, categories, tags, author and featured image URL of each indexed post are stored in your own Algolia application, under your own account and your agreement with them.

What happens if the connection breaks?

Search falls back to ordinary WordPress search and your visitors see results instead of an error, while a listing block is less forgiving since it has nothing else to draw from, so an unreachable service leaves it empty and slows down the page it sits on while it waits.

#Still stuck

Open a support ticket with your index name, which of the two surfaces is misbehaving, and a screenshot of the Algolia settings page with the keys masked.

Last updated

Was this article helpful?

Related articles

FIND THE ONE THAT FITS YOUR PROJECT

Import a demo, swap the content, adjust the layout. Modern WordPress under the hood, fast even when the site fills up.