Hi
I want to replace the standard Vantage search with Google Custom Search. I want to keep the magnifying glass in the masthead but just replace the search engine. I think its searchform.php I need to amend but do not know what part to change so that it replaces the search engine only:
Existing Code:
<form method="get" class="searchform" action="” role=”search”>
<input type="text" class="field" name="s" value="” placeholder=””/>
Google Code I want to incorporate:
(function() {
var cx = ‘1234567890’;
var gcse = document.createElement(‘script’);
gcse.type = ‘text/javascript’;
gcse.async = true;
gcse.src = (document.location.protocol == ‘https:’ ? ‘https:’ : ‘http:’) +
‘//cse.google.com/cse.js?cx=’ + cx;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(gcse, s);
})();
I have seen plugins to incorporate GCS but then you can only put the search elsewhere on the page which is not what I want!
Kind regards.
Hi Rc127,
I’m really sorry about this but unfortunately, this isn’t possible without a fair amount of custom coding. This is beyond the scope of what we can help you with on the forums, but you could hire a developer to implement this for you. There may be plugins out there that will allow you to do this however I honestly can’t promise how well it will work, if at all, with Vantage. If you manage to find one that works please be sure to tell us so we can start recommending it.
We highly recommend using Codeable.