Reply To: keyword highlighter functionality

Home Forums Product Support Forums Ajax Search Pro for WordPress Support keyword highlighter functionality Reply To: keyword highlighter functionality


Ernest Marcinko

You are right, that should work as expected, but there is indeed something wrong.

I have investigated the plugin source, and appears that I have made a mistake in that function regarding exact matching. The problem is, that it only counts for the first word entered, it does not take the full phrase as the context, only the first one.

Since this is a programatical error, the only way of fixing it is by making a tiny change in the plugin code, in one of the plugin files. I will try to detail which line to change in which file, but if you need help with that, feel free to add a temporary FTP account to the details and I will do it for you.

1. I always recommend having a backup of everything before making any change, just in case. If you have a back-up proceed to the next step.
2. Open up the wp-content/plugins/ajax-search-pro/includes/classes/search/class-asp-search-cpt.php file via FTP
3. Scroll to line 1518, which should be this:

$_content, $_s[0],

..and change that line to this:

$_content, $s,

4. Save the file, and it’s done.

Now, the context finding function should return the context around the whole search phrase. I hope this helps!

Ernest Marcinko

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