When you create a Google custom search, the autocomplete might take some time to go live.
To fix your Google custom search not working issue, follow the steps below.
- Login into your Google custom search control panel.
- Choose your custom search engine.
- Go to Search features-> Autocomplete and “enable autocomplete”.Basic
- Go to Setup-> Basics-> Get code and copy the code.
- Edit this code following the instructions below for enabling autocomplete in the google custom search code, replace
<gcse:search></gcse:search>
with
<gcse:search enableAutoComplete="true"></gcse:search>
For example-
<script> (function() { var cx = '003606982592251140240:5xbiwoxb3m0'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = 'https://cse.google.com/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); </script> <gcse:search enableAutoComplete="true"></gcse:search>
This will enable autocomplete.
- You might have to wait for 24 hours for the changes to appear.
- Google custom search autocomplete comes with ads. For an ad free experience, you could sign up for ExpertRec’s autocomplete service.