Search Box Options ...


Please can someone tell me how i would change the standard search to bring back exact phrase results on my website? Also i would like the results to come back like the advanced search does in a 2 colume format on the results page.

Thank you.


I have found the following code in my core dir but i am un sure if this is right or even can be done to my above question. However if im right in thinking the code is reading that it will bring back “all” results back, when someone searchs for a name on the website. However i want to change “all” to “exact phrase” if possible?

// Search string condition for SQL query

if (!empty($params[‘q’])) {

if ($params[‘match’] == ‘any’) {

$pieces = explode(’ ', $params[‘q’]);

$search_type = ’ OR ‘;

} elseif ($params[‘match’] == ‘all’) {

$pieces = explode(’ ', $params[‘q’]);

$search_type = ’ AND ';

} else {

$pieces = array($params[‘q’]);

$search_type = ‘’;


I have just done this now, if you change the code to the following then it will work, if anyone else wants to know.


if ($params[‘match’] == ‘any’) {

$pieces = explode(’ ‘, $params[‘q’]);


if ($params[‘match’] == ‘exact’) {

$pieces = explode(’ ', $params[‘q’]);

thank you