Custom Google Site Search

If you want a search field on your website, you can create a custom Google search field, that will only search your website. More information regarding the Google Custom Site Search can be found here: https://developers.google.com/custom-search/

Follow the steps from the guide and modify the code as described below:

The following is an example script provided by Google ( Does not work on ChurchDesk websites):

<script async src="https://cse.google.com/cse.js?cx=000000000000000:cccccccc"></script><div class="gcse-search">&nbsp;</div>

To get it to work you will have to replace the following line:

<div class="gcse-search"></div>

with the code below:

<style type="text/css">.gsc-control-cse * { box-sizing: initial; }
  .gsc-search-button { line-height: normal; }
</style>
<div class="gcse-search"></div>

Make sure that there is no space after the "?" in the script copied from Google.

BAD:  https://cse.google.com/cse.js? cx=000000000000000:cccccccc
GOOD: https://cse.google.com/cse.js?cx=000000000000000:cccccccc

Add the search field to the website

This is how you insert the search field when you have gotten the code from Google:

  • Go to HOMEPAGE
  • Click on "+ Create content" an choose Text View
  • Add a title for the Text view
  • Before you add the code into the text box, click on "Switch to plain text editor" below the text box
  • Save the Text View

Now you can add the Text View to a page on the website in the upper/bottom block.You can see more about creating and adding text views to the website here.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us