WordPress Developer Ukraine, Kyiv
CSS Custom Highlight API: Highlighting Text Ranges Without DOM Changes

CSS Custom Highlight API: Highlighting Text Ranges Without DOM Changes

The CSS Custom Highlight API: highlight search terms without changing the DOM Highlighting the search term in results used to mean wrapping every match in a <mark> element: a regular expression over HTML, broken markup when the term appears inside an attribute, and a re-render of the content. The Custom Highlight API highlights text ranges…
Implement Full-Text Search in WordPress with MySQL MATCH AGAINST

Implement Full-Text Search in WordPress with MySQL MATCH AGAINST

Full-text search in WordPress with MySQL MATCH AGAINST The built-in WordPress search runs LIKE '%word%' on the title, excerpt and content of every post. That reads the whole table for each search and sorts the results only roughly by relevance. On a site with tens of thousands of posts, a MySQL FULLTEXT index answers the…
AJAX live search in WordPress

AJAX live search in WordPress

AJAX live search in WordPress Adding AJAX to a search form makes the experience far more dynamic and user-friendly: results appear while the visitor types. This article walks through how to build one from scratch.