Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search bar not working after plugin upgrade
This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 2 months ago.
- AuthorPosts
- January 24, 2022 at 5:51 pm #36374
Hi,
On my staging site – I upgraded the plugin to latest PRO version, and on the front-end the AJAX feature stopped working on the search bar.
If before it would open the little box with the results – now it does nothing.I am not sure what went wrong or how to fix it.
Can you assist me ?
Thank you,
-MarkJanuary 25, 2022 at 9:49 am #36378Hi Mark,
May I ask how is that search bar placed to the menu?
I looked in the theme editor in functions.php, and I found a relevant code, however that is not it. If I disable the code the search bar is still present on the page.
Best,
I created a test search bar, and replaced that shortcode with it, and it is working fine. I assume the original search bar is placed there either directly injectin the HTML output of the search or via javascript. In the most recent versions, the HTML output has changed a bit, there is a container element added, without that the plugin can not initialize. In case you are directly outputting the HTML code of the search, then try to capture the new output first. However I do not recommend that method when avoidable, as using the shortcode will always get you the latest output, and it is the only supported use of the plugin search bar.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 25, 2022 at 3:52 pm #36390Hi Ernest,
Thank you for replying. I am indeed doing it via Javascript, in order to shift the search bar to be placed in the middle. We have a complicated Menu_Walker to generate the menu (also done with a megamenu plugin).
Attached a screenshot of the JS code.
I will follow your guidance to figure out how the new HTML output works.
Thanks again!
Attachments:
You must be logged in to view attached files.January 25, 2022 at 5:04 pm #36394Was a quick fix, I just needed to grab the parent element
var widgetSearch = $(‘#ajaxsearchpro3_1’).parent(),Thanks for the assistance!
January 25, 2022 at 9:42 pm #36402You 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.