If there is one hit on a search redirect to that post's permalink.

git-svn-id: https://develop.svn.wordpress.org/trunk@493 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2003-10-27 23:00:39 +00:00
parent 986f72bbf0
commit 69c3c568ce
1 changed files with 3 additions and 0 deletions

View File

@ -307,5 +307,8 @@ $posts = $wpdb->get_results($request);
if (1 == count($posts)) {
$more = 1; $c = 1; $single = 1;
if ($s) { // If they were doing a search and got one result
header('Location: ' . get_permalink($posts[0]->ID));
}
}
?>