Description
WP Static Search
This plugin adds a static search engine to your WordPress site. Static in this context means that it works in the browser without using of server-side queries, so it’s ideal for static websites generated from a WordPress site.
Since both the search and the indexing happens in the browser, this plugin is not a good fit for sites that contain hundreds of pages and posts.
Getting Started
After you are installed the plugin, choose the ”Static Search” option from the left sidebar of the WordPress admin interface. Press the ”Update Index” button and wait until the indexing is finished. Each time you change the content of the website, you should update the search index manually.
To insert the search box and the search results into the site, use the [static_search] shortcode. It’s a good practice to create a page called ”Search” with the slug ”/search/” and insert the [static_search] shortcode into this page. To redirect the search widgets to this page, append the following code to the bottom of your .htaccess file:
RewriteCond %{QUERY_STRING} \\?s=([^&]+) [NC]
RewriteRule ^$ /search/?q=%1 [NC,R,END]
This code redirects the search queries to the /search/ page, then the [static_search] shortcode processes them and shows the search results.
Built With
lunar.js – Javascript search engine
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the Apache 2 and GPL2+ Licenses
Acknowledgments
The frontend search code based on the MkDocs project’s search plugin.
Reviews
Contributors & Developers
“WP Static Search” is open source software. The following people have contributed to this plugin.
Contributors“WP Static Search” has been translated into 2 locales. Thank you to the translators for their contributions.
Translate “WP Static Search” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.