This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Static Search

ਵੇਰਵਾ

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.

ਸਮੀਖਿਆਵਾਂ

20 ਨਵੰਬਰ 2020
Hello, I like the design of this plugin a lot and after fixing the search results issue it works fine. I'm currently working on a couple of small sites with a few dozen pages, some quite long, and the performance is good - I only notice a pause for the initial loading of the search index. My intention is to generate a static site for offline use, using WP Static Search in conjunction with an existing plugin like Simply Static. At least in this context, the plugin appears to be limited as it makes use of web worker methods in delivering search results and hence requires a server, albeit no PHP scripting. Also, the resulting static site needs to be hosted in the web root. (The following is perhaps more suitable for a support topic, but I mention it here in case of wider interest.) Keen to see it become more flexible, I've created a fork on Github and submitted a pull request with a number of changes, mainly removing the reliance on web workers. These remove the constraints, so that the search facility can work offline in any directory, i.e. you can use a plugin (or wget in my case) to create the static site and put it on a memory stick. Thank you, Paul.
Read all 2 reviews

ਯੋਗਦਾਨੀ ਤੇ ਵਿਕਾਸਕਾਰ

“WP Static Search” is open source software. The following people have contributed to this plugin.

ਯੋਗਦਾਨੀ

“WP Static Search” has been translated into 1 locale. Thank you to the translators for their contributions.

“WP Static Search” ਦਾ ਆਪਣੀ ਭਾਸ਼ਾ ਵਿੱਚ ਅਨੁਵਾਦ ਕਰੋ।

ਵਿਕਾਸ ਕਾਰਜ ਵਿੱਚ ਰੁਚੀ ਰੱਖਦੇ ਹੋ?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.