Skip to content

Instantly share code, notes, and snippets.

@rickrduncan
Last active December 25, 2015 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickrduncan/6932523 to your computer and use it in GitHub Desktop.
Save rickrduncan/6932523 to your computer and use it in GitHub Desktop.
Add Google CSE to WordPress websites using the Genesis Framework.
<script>
(function() {
var cx = '007935457329138067308:j8ssm1gufja';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchresults-only linkTarget='_self'></gcse:searchresults-only>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment