A super light-weight live search plugin that utilizes the WP REST API.
WP Live Search (beta) is a search plugin for WordPress that returns results as the user types for what they are looking. It currently supports posts, pages, post types, including multiple post types, and design modes.
This is very much a working prototype, so please log any issues you find on the Github repo below.
Here's some documentation.
Add the shortcode
[wp_live_search] to a page or something. There's a few shortcode attributes that you can use, and are as follows:
Your choices are
pages. Defaults to
posts. You can also pass
type,type to search multiple post types. For example type="recipes,books"
By default this is turned off. Set this to true only if you're using multiple post types above.
The text displayed in the input. Defaults to
Total search result to return. Default is 20
Show the excerpt along with the title and featured image (if set)
Makes a tiny WP Live Search for use in header widgets and such
Display search results as a drop-down instead of pushing down the content around it
The text displayed for the results. Defaults to
Displays the "entries found" inside of the input area, useful for using in areas like header widgets where space is minimal.
An optional target UL parent to send the search results to. Example
Here are a couple examples:
Use in Header Widget:
[wp_live_search compact="true" dropdown="true" results="found" results_style="inside"]
Search through multiple post types:
[wp_live_search multi="true" type="posts,page"]
Requires: 3.5.1 or higher
Compatible up to: 4.2.11
Last Updated: 2 years ago
Active Installs: 300+
Got something to say? Need help?