Search by Hyphen
One approach is to modify the exclusion prefix through the wp_query_search_exclusion_prefix filter that’s supported in WP 4.7+. See ticket #38099. Here’s an example how we can change it from – to e.g. !: add_filter( ‘wp_query_search_exclusion_prefix’, function( $prefix ) { return ‘!’; // adjust to your needs (default is -) } ); where we would use … Read more