DEV Community

Cover image for Init Live Search – Smarter WordPress Search with Slash Commands & REST API
Hao Nguyen
Hao Nguyen

Posted on • Edited on

Init Live Search – Smarter WordPress Search with Slash Commands & REST API

A fast, flexible live search modal for WordPress – powered by REST API and slash commands

Init Live Search replaces the default WordPress search with a modern modal. Built on the REST API, it works instantly, supports keyboard navigation, slash commands, and integrates smoothly with WooCommerce, SEO plugins, and ACF.

No jQuery. No page reloads. No BS.


Features at a Glance

Minimalist, Modern UX

  • Modal-based UI (Ctrl + /, triple-click, data-ils)
  • Instant results via REST API (no admin-ajax, no jQuery)
  • Infinite scroll support
  • Local caching with localStorage

Smarter Search Logic

  • Match by title + tags with bi-gram fallback
  • Search in SEO metadata (Yoast, Rank Math, AIOSEO, TSF, SEOPress)
  • Support ACF fields (e.g. company_name)
  • Tunable ranking (e.g. title > SEO > tags)

Productivity Built-In

  • Slash commands: /recent, /id, /fav, /product, /sku, /price, etc.
  • Full keyboard support: ↑ ↓ ← → Enter Esc
  • Quick search tooltip when selecting text
  • Voice search via SpeechRecognition (optional)

WooCommerce Ready

  • Filter by SKU, stock, price, sale status
  • Show prices, badges, "Add to Cart"
  • Slash commands: /product, /on-sale, /stock, /sku

Theming & Customization

  • Built-in style presets: style-full.css, style-topbar.css
  • Theme override support (style.css in theme)
  • Optionally disable all plugin CSS
  • Dark mode (dark, light, auto)

Optional Lightweight Analytics

  • Track query count, frequency, timestamps (no personal data)
  • Grouped view, export as CSV
  • Disabled by default, uses WordPress transients

Built for Developers

  • PHP filters to override queries, ranking, result data
  • REST API endpoints: /search, /product, /id, etc.
  • JS events: ils:search-started, ils:results-loaded, etc.
  • Complete developer docs + override guide

Slash Command Examples

Command Action
/recent Show latest posts
/id 123 Load post by ID
/product List products
/sku ABC123 Find by SKU
/on-sale Show sale items
/price 100 500 Filter by price range
/fav Show saved favorites (localStorage)
/random Jump to a random post

👉 Full Command Guide


Dev Tools You Get

  • JS events like ils:modal-opened, ils:results-loaded
  • PHP filters for SEO fields, fallback logic, and more
  • Theme override with custom style.css
  • Zero jQuery. Zero indexing. Zero external dependencies.

Installation

Install via WordPress.org or:

git clone https://github.com/brokensmile2103/init-live-search.git
Enter fullscreen mode Exit fullscreen mode

Then activate and configure in Settings → Init Live Search.

Ways to trigger the modal:

  • Focus any <input name="s">
  • Press Ctrl + /
  • Triple-click anywhere
  • Click elements with data-ils
  • URL: ?modal=search&term=seo

Part of the Init Plugin Suite

Init Live Search is part of the Init Plugin Suite – a set of minimalist, performance-first tools for WordPress developers.


Thanks for reading. Got feedback or questions?

Project Page

GitHub

Top comments (0)