Google Site Search
For T29, artA05, artA06 and horizontal CSS menu templates
This support info is for templates that include a "search.js" and a "OPTIONAL-search-SIMPLE.js" for the Google site search setup. If you have a "search.js" but your template does not include a "OPTIONAL-search-SIMPLE.js" see this support page. If you want to add a search to a template see this support page.
Search .js file locations:
The template search .js files you will be editing may be located either in your main template folder with your HTML pages or in your template "extras" folder.
Option #1: Simple Google setup:
For the easiest search setup to search your site, delete or rename the "search.js". Rename the "OPTIONAL-search-SIMPLE.js" to "search.js". Edit the "var searchdomain" in the now renamed "search.js" with your website domain name. Test the form on one of your template pages. Google should now search "your site only" from your template search box.
Option #2: Integrated Google setup:
This is the default option setup in the template in your download. This can be involved to setup but will use your template logo header and footer in the search results.
Follow the directions at Google to setup the search and click the "finish".
Go to the control panel for the search and find the "code" link.
On the code page click on the "Search box and search results code for your website". New code will appear on the page.
Copy all the code from the 2 boxes on this page and paste this into a text file you create by right clicking in your template folder and choosing "new" then "text document". Save this text file.
You will now edit the "search.js" in 3 places. With your domain name, your Google "id" and your Google "cx" from the "CSE Search Box" that you just created in your Google account. Click here to see areas to edit in the search.js.
From your saved text file, copy all the "Google Search Result" code, open the "search_results.html", find the search results code in the page now and paste your results code over this code. Be sure to upload this HTML page when you upload.
Trouble-shooting: Integrated Google setup:
If you have done the steps above and the integrated Google search is not working, try the following:
Make a copy of any HTML template page. The "missing.html" or "thanks.htm" is a good page to copy for this. Name it "search.htm".
Add your generated search code to this page exactly as Google instructs. Do not add this to the "search.js" file, paste the code right into the HTML page.
Create a results page exactly as Google indicates with a copy of a template page. Use the name for this page that Google suggests. Add your results code from your Google account to this page.
Open the "search.htm" and test to see if your test search works.
IF THE TEST SEARCH WORKS:
Save the 2 pages you created.
Compare the code in the "search.js" to the code in the "search.htm" you created.
Compare the results code in the test "search.htm" and the template "search_results.html" pages.
If you can not find the problem you can contact Allwebco support and we will look at all your files. We will need your working test pages uploaded to your hosting area to check them.
IF THE TEST SEARCH DOES NOT WORK:
Check and see if your site is listed at Google.
Check and see if all your pages are listed in Google. You can check this under the advanced search at Google and "Search within a site or domain" option.
If your site is not listed with Google you may need to wait a few days for it to be listed and for the search to work.
Try searching for text that is included on your homepage.
Make sure you have used all new generated code from your Google account.
Option #3: Burgdorf's WebSearch:
An "OPTIONAL-Burgdorf-search.js" will be included with your template download. For a custom non-Google, no ads website search see Burgdorf's WebSearch setup.