Articles on: Homepage

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/

NB! You need to add your own domain name (like mychurch.com) to the Google Search field you are creating via Google. It will not work if you add a ChurchDesk domain like mychurch.churchdesk.com

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):



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



with the code below:

.gsc-control-cse * { box-sizing: initial; } .gsc-search-button { line-height: normal; }


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.

Updated on: 02/05/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!