Love the look of the new search.
However for some reason I can't get the search to work on a site.
Looking into the console, I'm getting the following:
Uncaught TypeError: Cannot read property 'search' of undefined on line 4152
Hi its me again,
OK - I believe I found the issue in my case. Is it possible to add the site url as the root of site when making the AJAX request to the wp-jason search? My install is in a sub-folder at the moment so that we could test the new search without breaking the live site and the AJAX request is made to the root of the domain
I'm assuming site-url is not used based on the following error but I could be wrong:
Access to XMLHttpRequest at 'https://whiteoctopuswebdev.com/wp-json/laytheme/search/' (redirected from 'http://whiteoctopuswebdev.com/wp-json/laytheme/search/') from origin 'http://whiteoctopuswebdev.com' has been blocked by CORS policy: Request header field x-requested-with is not allowed by Access-Control-Allow-Headers in preflight response.
@plpepin I failed to mention that the site with the laytheme is in a sub directory of the main domain mentioned in the error above ( as in http://whiteoctopuswebdev.com/staging/my-install-with-laytheme
just to completely understand you:
On the website which you installed in a subfolder you want to show the Search-Results from the main-folder website?
Before you post
Use the Search Feature. Maybe there is already a solution to your issue.
1. Update Lay Theme and all Lay Theme Addons
2. Disable all Plugins
3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
4. Now see if your problem solved itself
5. Go here, see if your problem is listed here:
When you post:
1. Post a link to where the problem is
2. If the problem is difficult to explain, post screenshots / link to a video to explain it