Issue with default theme search replace

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Issue with default theme search replace

This topic contains 4 replies, has 2 voices, and was last updated by graememyburgh graememyburgh 6 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14886
    graememyburgh
    graememyburgh
    Participant

    For some reason, the theme search bar replace function has not worked on my site. It has replaced the default site search with the Ajax Pro Search search bar. However, the ajax is not working so when I enter search phrases, nothing happens.

    To see the default search (that is not working), goto http://www.wisdomtrove.com and look in top right.

    The ajax search is working fine at http://wisdomtrove.com/quote-topics/

    Any help you can give would be greatly appreciated.

    Graeme

    #14895
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Graeme,

    Thank you for the proper details, I think I see what the problem is there.

    I did a bit of investigation on how that menu search pop-up thing works in the site corner. It basically stores the while search in a link data attribute, and once the user clicks it, it copies it over to the actual DOM tree. This means that the search on document load is basically not present on the document, therefore the initializer script is not able to initialize it. This is a very bad practice, and I always discourage developers of doing this, as it virtually makes impossible to to replace the contents with anything interactive (javascript event driven).

    In this case the lucky thing is that the pop-up script does not duplicate the elements, so after the first click everything stays as it is. This makes this issue resolvable, with a small custom code.

    Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

    This will add a small script to the page, which will re-initialize the search when the pop-up magnifier is clicked for the first time. Let me know if you need help with it!

    Best,
    Ernest Marcinko

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


    #14906
    graememyburgh
    graememyburgh
    Participant

    Wow, you are the king of all kings!! That works like a charm. Thanks for your absolutely amazing app and for your help with this issue.

    #14907
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #14908
    graememyburgh
    graememyburgh
    Participant
    You cannot access this content.
Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Issue with default theme search replace’ is closed to new replies.