Reply To: Can't get plugin to work

#3375
Ernest Marcinko
Ernest 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:


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

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:


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

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

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)