WordPress Live Search (ajaxerch)
Search results as you type, through three different routes.
Live search for WordPress that can run through the REST API, admin-ajax, or a template redirect that works with page caching.
// what-it-does
What it does
Which route is fastest depends on the host. So it offers three.
Results appear while the visitor types. The REST API is the clean route, admin-ajax is the most compatible one, and the template redirect lets a page cache serve repeated searches.
Routes
- WordPress REST API
- admin-ajax.php
- A template redirect, for caching
// how-it-was-built
How it was built
PHP for the three endpoints, JavaScript for the search box.
Filed under WordPress and WooCommerce on the old portfolio, since it searched products as well as posts.
A custom build from before 2022. The code was never published and I no longer maintain it; this page keeps the record of what it did.
// portfolio/
Where the work went next
The portfolio is the record. The plugins, apps and systems I still maintain have their own pages, with current versions and numbers.
- PortfolioEvery old project, filterable by category
- ProductsThe plugins, apps and systems I keep running
- Open sourceEvery public project, with its status and numbers
- Ultimate InvoiceInvoices, slips and labels for WooCommerce
- Advanced Profile SolutionGrown from Ultimate Profile Solutions
- Receipt Uploader for WooCommerceBank transfer receipts, against the right order
- ServicesWordPress, WooCommerce and custom builds today