Reply To: Can\'t install ajax search plugin via ftp or dashboard

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Can\'t install ajax search plugin via ftp or dashboard Reply To: Can\'t install ajax search plugin via ftp or dashboard

#2888

Ernest Marcinko
Keymaster

Hi!

I just checked the problem and fixed it. It was actually the theme causing the issue. The theme functions are declared without checking for existing function names, and the search plugin happened to have already a function with the same name. The search plugin checks for duplicate entries, however it is executed earlier then the theme, so the only way to avoid this conflict, I had to add 2 extra lines to the themes functions.php file.

Please notifiy the theme developer to implement function name checks, as it may cause similar issues with any other plugin, and there is no way to avoid it in the plugin code.
Here is the simple method used, you can show it to the theme developer, but I'm sure he just forgot it:

if (!function_exists('function_name')) {
    function function_name() {
    …
}

The extra lines to the themes functions.php file were added to line 1008 and 1022.

Best,
Ernest Marcinko

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