04/06/2016 at 12:58 pm
#371883
Keymaster
@ NuMedia
re: I’m having a difficult time parsing the code for the proper hook from the theme functions file.
I gave you the proper hook name, cn_search_terms and link to its location in the file. Here it is again:
I suggest adding the this using the Code Snippets plugin. Never, never, plop code in the theme’s functions.php file regardless what all those old tutorials on the web say to do.
re: Could you provide an example?
Completely untested…
add_filter( 'cn_search_terms', 'NuMedia_Search_Filter' );
function NuMedia_Search_Filter( $terms ) {
if ( in_array( 'city', $terms ) ) {
$terms[] = 'cities';
}
return $terms;
}
