I have written an AJAX call for my search result to suggest posts from my website as they type. I wrote the code in child-theme, and the code is running in that browser, Then when I am trying to run it on a different browser or in incognito mode it won’t run. In the console it is showing jQuery is not Defined.
I have added jQuery to my site as Tom said in a post but it is not the latest version I think and it is showing JQMIGRATE: Migrate is installed, version 3.3.2, is this ok?
Yes, WordPress does include jQuery, but it needs to be enqueued by a theme, plugin or function.
GP doesn’t use jQuery, unless you use the Sticky Navigation option, and therefore doesn’t enqueue the script.
So you will need to š
I have added this code to enable it, is it ok? And in the browser console, it is showing JQMIGRATE: Migrate is installed, version 3.3.2… is it also ok?
Yes, now that MIGRATE message is also gone and it is working. As I said I did this AJAX search on the search form page but I have added a normal search bar on the homepage can I also have the same results with it? I have added the page link where it is working, but you have to clear that search phrase and give input, and it will suggest you post based on what you type…Now if you go to the homepage I want to do the same search process, can you give me an idea, of how to do it?