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
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.
- 01Upload supasearch to the /wp-content/plugins/ directory
- 02Activate the plugin through the ‘Plugins’ menu in WordPress
- 03Place <?php if( class_exists( 'Supasearch_Public' ) ) { Supasearch_Public::misspelling( get_search_query(), 'Showing results for <span>', '</span>' ); } ?> in your search results template
- 04Place <?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
Frequently asked questions.
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>' ); } ?>