Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Integration and compatibility issue
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 4 months ago.
- AuthorPosts
- July 19, 2016 at 3:58 pm #9550
Hi, I have a compatibility and integration problem on my website. I installed the plugin and set Ajax Search Pro to substitute the classif WP search.
The form is working fine, but when you click on the magnifier (see the attached screenshot 01) and then you open the search box, you cannot close it anymore. I tried a lot of options but unsuccesfully. Do you have some suggestion? Thank you. Filippo
Attachments:
You must be logged in to view attached files.July 19, 2016 at 4:15 pm #9552Hi Filippo,
It’s because there are is a custom script executed related to the old header search and it throws an error breaking further execution – because the old search is not there anymore: https://i.imgur.com/y35ULiO.png
The error is coming from the theme, I might still be able suggest a solution so you don’t have to contact the theme author as well:1. Open up the /wp-content/themes/orion/js/custom.js file and srcoll to line 260, which should be this:
jQuery(‘.headersearch .search-box input[type=text]’).setCursor(0);
2. Remove that line.
This tries to focus the input field of the old search once it’s opened, however it’s no longer there so it encounters an error.
Also, I have noticed that the search “opener” icon is positioned absolutely by default, covering the search bar. If I may suggest the following custom CSS to fix the search bar position:
Best,.asp_main_container { position: absolute; left: 60px; top: 5px; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 19, 2016 at 5:07 pm #9553Hi Ernest, thanks a lot for the precious support. Part of the issue is solved, but once I open the Ajax Search Pro box, I cannot close it anymore, I have no possibility to go back to the menu. I also tried to activate the “Close on magnifier click” but it’s not working… any other suggestion? Thank you a lot. Filippo
July 19, 2016 at 5:18 pm #9554Hi Filippo,
You can turn off the “close on magnifier click” option, as it won’t help in this case.
From the theme code I can see that the closing of that search bar was attached to the event when the user clicked outside of the original search box. It no longer works, since the original search is not there anymore.
I might have found a solution to that as well.1. Open up the same file as before, and scroll to line 277:
jQuery('.headersearch .search-box input[type=text]').blur(function(e){
2. Try replacing that line with:
jQuery('body').click(function(e){
I’m not sure how it will react, but it should trigger the closing event if the user clicks outside the search bar.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 19, 2016 at 5:27 pm #9555Great, it’s working! Thank you so much for the super fast support. Best. Filippo
July 19, 2016 at 5:28 pm #9556You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.