Incompatable with Karma theme

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Incompatable with Karma theme

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 8 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6584
    michaeln
    michaeln
    Participant

    I have found the plugin incompatible with Karma theme. The search and styling works fine in the search builder and will work in the sidebar widget. It does not function in the page.

    I switched to the wordpress “twentyfourteen” theme as a test and it functioned normally and the styling appeared normal. Once I switched back it no longer functioned again. I also deactivated all plugins I have with the exception of woocommerce and it still doesn’t function. I have to conclude Ajax Search Pro has an issue with the Karma theme.

    This site is presently a test and setup site located internally and is not Internet facing. I am hoping you have seen this before since the Karma theme is a top seller on Envato.

    #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 :)


    #6588
    michaeln
    michaeln
    Participant

    Hi Ernest,

    Thanks for the quick help. Unfortunately it didn’t work for me. I copied/pasted your code to the themes functions.php file as directed and uploaded the file, restarted apache and it didn’t change anything. I even rebooted the server but still not any better.

    Thanks for trying.
    Michael

    #6592
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    In the meantime I’ve spoken to the theme author, he is implementing a modification to the upcoming release. I’m also adding a piece of code to all my plugin releases to make sure it’s working.

    I’ve tested the code I’ve provided on a different environment, and it was indeed not working there. I will have to release an update soon to fix that.

    I’m attaching the upcoming bugfix version of the search to this post. Please install this one, it has a tiny modification that should help. Also, keep the modification I suggested in the previous post, it should work with the attached plugin version.

    Attachments:
    You must be logged in to view attached files.
    Best,
    Ernest Marcinko

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


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.