This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Can't get plugin to work

#3375
Ernest MarcinkoErnest Marcinko
Keymaster

Hi!

This is actually a hard coded thing in the current version, but with a very quick modification you can change the order. If you open up the wp-content/plugins/ajax-search-pro/search.php file and go to lines 342-351, you should see this:

[php]
} else {
$results = array_merge(
$alltermsresults,
$blogresults,
$allbuddypresults["activityresults"],
$allcommentsresults,
$allbuddypresults["groupresults"],
$allbuddypresults["userresults"],
$allpageposts
);
[/php]

As you can see the $alltermsresults variable is merged into the results sooner than anything. Let’s move that variable to the end and the terms will appear after the contents:

[php]
} else {
$results = array_merge(
$blogresults,
$allbuddypresults["activityresults"],
$allcommentsresults,
$allbuddypresults["groupresults"],
$allbuddypresults["userresults"],
$allpageposts,
$alltermsresults
);
[/php]

Save the file. The terms should appear now after the regular results.