Use get_query_var to get the search terms.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren
2004-09-27 00:46:42 +00:00
parent e61cfd4b02
commit 7f5ef5c1d3
2 changed files with 8 additions and 5 deletions

View File

@@ -297,6 +297,7 @@ class WP_Query {
}
if (!$q['sentence']) {
$s_array = explode(' ',$q['s']);
$q['search_terms'] = $s_array;
$search .= '((post_title LIKE \''.$n.$s_array[0].$n.'\') OR (post_content LIKE \''.$n.$s_array[0].$n.'\'))';
for ( $i = 1; $i < count($s_array); $i = $i + 1) {
$search .= ' AND ((post_title LIKE \''.$n.$s_array[$i].$n.'\') OR (post_content LIKE \''.$n.$s_array[$i].$n.'\'))';