Reply To: Replace default theme search problem

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Replace default theme search problem Reply To: Replace default theme search problem

#7695

Ernest Marcinko
Keymaster

Hi!

1. The problem is that by clicking on that search icon it creates a clone of the search instance, which results in duplicated element ids and names, and that is invalid HTML code. (so basically that search instance is twice on the same page with matching IDs) I'm guessing it's how the menu was programmed, to copy elemetns over from another container.

Unfortunately there is literally nothing I can do to make it work. I have investigated and tried different solutions on my console, but none of them worked. One of the issues is the cloning itself – it's a very bad practice as it does duplicate elements without checking validity, and also every event handling attached to the original element gets detached. The re-attachment I would be able (and was able) to fix, but since there are elements with duplicated unique IDs, the script won't work 🙁

A better and cleaner solution would be to use some kind of pup-up script that does not clone the contents from somewhere else. You can easily find one, this for example is extremely well done and very neat: http://tympanus.net/codrops/2013/06/25/nifty-modal-window-effects/

2. The (non-ajax) search results page design is exclusively a theme feature, the search plugin can only add/replace items there, but the actual layout is coming from your currently active theme.

The HTML code is usually generated in the search.php file in the theme folder, you can add/remove parts there I guess, but I suggest asking the theme author if you are not sure. He will probably suggest to create a child theme and will be able to tell where the exact styling for the search page is located.

Let me know if you need any more help or suggestions!

Best,
Ernest Marcinko

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