10/25/2016 at 10:41 am
#397161
Keymaster
@ Игорь Афанасьев
You can enable exact search only with a filter. Install the Code Snippets plugin.
Add the following code as a new snippet:
add_filter( 'cn_search_terms', 'cn_exact_search_only' );
function cn_exact_search_only( $terms ) {
return array( $terms[0] );
}
Save and Activate the snippet (important, it must be activated).
Now, when searches are made, it will only return results based on the entire string entered by the user and not do searches based on partial word matches of each word entered by the user.
Hope that helps!
