Plugin Author
jojaba
(@jojaba)
Hello,
Thanks for the feedback.
I see on the autoptimize plugin page that js loading is delayed to footer, this is why afr doesn’t work I guess. The js must be loaded before the content to get this plugin work…
What belongs your theme, you have to add yourself the styling of afr in your theme stylesheet (typically: /wp-content/theme/theme_name/style.css). I don’t know Hueman theme, I can’t help you to solve this problem, sorry.
-
This reply was modified 9 years, 8 months ago by
jojaba. Reason: link to autoptimize plugin
The js must be loaded before the content to get this plugin work…
in that case your JS can be configured to be excluded from autoptimization; which files would that be? any inline JS as well?
frank (ao dev)
Plugin Author
jojaba
(@jojaba)
js in head section:
/wp-content/plugins/autocomplete-for-relevanssi/awesomplete-gh-pages/awesomplete.js
Inline js in the footer (just before </body> ending tag):
<script>
var searchInputs = document.getElementsByName("s");
for(var i = 0; i < searchInputs.length; i++) {
var awesomplete = new Awesomplete(searchInputs[i]);
awesomplete.list = ["..."];// your indexed words
awesomplete.minChars = 2;
awesomplete.maxItems = 5;
}
</script>
Plugin Author
jojaba
(@jojaba)
Is the issue solved Li-An?
Thread Starter
Li-An
(@li-an)
I put it solved – as it was just a test for me, it’s not compatible with Search in Place. I have to make a choice.