Reply To: Incompatable with Karma theme

#6586
Ernest Marcinko
Ernest Marcinko
Keymaster

Hi!

I’ve just tested and debugged the issue.

In this case I’m afraid it’s the theme at fault. At closer inpection I discovered that they are using their own formatter instead of the wpautop() function. The formatter automatically runs on every content element and appends paragraphs and empty line tags where it’s needed. It’s a very handy function, but the problem is, that this custom formatter does this to shortcodes content as well. This modifies the search shortcode final layout and causes a problem with the script initialization.

I cant do anything to the search plugin to prevent this, unless they add the search shortcode as an exception to the handler.

But to help you, I suggest the following minor change to the theme functions.php file:

1. Find this function: truethemes_formatter($content) – for me it was on line 328 – 358 in functions.php file in the theme folder
2. Replace the function with this slightly modified one: http://pastebin.com/raw.php?i=qtRkUPNj

That should put the search shortcodes to the exceptions list, and the problem should go away.

I will contact the theme author to append this modification to the next version of the theme 🙂

Best,
Ernest Marcinko

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