Home>Support>Changing Vantage Search to Google Custom Search

Changing Vantage Search to Google Custom Search

By rc127, 9 years ago. Last reply by Alex S, 9 years ago.
Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

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.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 4 months ago Alex S
    Hi, I Work Here

    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.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More