這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Supasearch

外掛說明

Supasearch enhances the default WordPress search.

The Supasearch plugin allows users to quickly and easily enhance the default search provided by WordPress. Just install and activate this plugin to have an immediately improved site search.

Features include:

  • Misspellings. If no results are found for a search term the plugin which check if the word is misspelt and provide results for the corrected word.
  • Did you mean?. If no results are found the plugin will offer a similar alternative for the user to search against.

安裝方式

  1. Upload supasearch to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Place <?php if( class_exists( 'Supasearch_Public' ) ) { Supasearch_Public::misspelling( get_search_query(), 'Showing results for <span>', '</span>' ); } ?> in your search results template
  4. Place <?php if( class_exists( 'Supasearch_Public' ) ) { Supasearch_Public::did_you_mean( get_search_query(), 'Did you mean: <span>', '</span>' ); } ?> in your search results template “Nothing Found” section

常見問題集

How to I display the misspelling feature in my theme?

Place the following code in your search results template, typically the search.php file within your theme:

<?php if( class_exists( 'Supasearch_Public' ) ) { Supasearch_Public::misspelling( get_search_query(), 'Showing results for <span>', '</span>' ); } ?> 
What about foo bar?

Place the following code in your template which renders when nothing is found, typically the template-parts/content-none.php file within your theme:

<?php if( class_exists( 'Supasearch_Public' ) ) { Supasearch_Public::did_you_mean( get_search_query(), 'Did you mean: <span>', '</span>' ); } ?> 

使用者評論

閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Supasearch〉的開發相關工作。

參與者

將〈Supasearch〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

0.2.0-beta

Release Date: October 31, 2016

  • Correction logic update to use previous popular queries.
  • Settings added to control accuracy previous popular queries.

0.1.0-beta

Release Date: October 17, 2016

  • Beta release featuring misspellings and did you mean suggestions to enhance the default WordPress search.