Search term with underscore
-
I want to include underscores in search, e.g. when searching for “array_values” I want to find pages where exactly this word occurs and not the words “array” and “values”.
To archive that, I have to use filter “relevanssi_punctuation_filter” to replace underscores with some placeholder (e.g. “UNDERSCORETAIKASANA”):
'_' => 'UNDERSCORETAIKASANA'
But then, this placeholder has to be replaced back to underscore:
$a = str_replace( 'DESIMAALITAIKASANA', '.', $a ); // This is already present in lib/common.php $a = str_replace( 'UNDERSCORETAIKASANA', '_', $a ); // This is new
Can you please add this? ??
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Search term with underscore’ is closed to new replies.