I want to add the following to the search query
PHP Code:
if(is_search()) {
$search = $wp_query->get('s');
$keywords = preg_replace('/\+/',' ',$search);
if (function_exists ('ngg_get_search_pictures')) { // function from functions.php
$nggpictures = ngg_get_search_pictures($keywords, ''); // put the number of pictures by row you want, if you don't want "4"
if ($nggpictures) {
echo "<h2>Pictures</h2>";
echo $nggpictures;
}
}
}