Google custom Search to create the perfect site search engine

Source: Internet
Author: User
Tags php file unique id

In all of the sites are essential to have "site search" function, this function, can be very convenient to help others on our website to find the necessary articles and related content. and frequent "in-site search", we need to call our database resources to increase the burden on the server. Today, pieces will be together with you, the "burden" passed on to Google, using Google's powerful custom search engine features for our web site services.

  

First, Google custom search Account Application

1, first you need to login Google Custom Search Account Application page: http://www.google.com.hk/cse/, and click on the upper right corner of the "registration" button to register. If you have a Google account, just log in.

2, fill in the necessary account registration information, and agreed to accept Google terms of service and privacy policy, create your account.

  

Google's three-step application for custom search

1, landing Google custom search, select New search engine.

  

2, enter the setup of your search engine page, please follow the steps below to operate.

① Describe your search engine: Add a name to your site search, and description, language Please select for Simplified Chinese.

② Define your search engine: Here we enter the site to search for the whole site. (note → To search for the site fill format: www.i7086.com/*)

③ Select version: Of course choose "Standard Version: free, but need to display ads on the results page." ”

④ check "I have read and agree to accept the terms of service" and click Next.

  

3, select or customize the style. Each style you can choose from here, you can choose to "try your search engine" in the instant display effect. Select OK and then click Next.

  

4, access to get code page. Tip "Congratulations!" you have successfully created the pieces search engine. , make sure to record the unique ID of the search engine. Is it over?? No, we also need to make "next steps" settings, otherwise you will not be able to use. Here we first select "Appearance" to set.

  

Third, Google custom search follow-up settings

1. After choosing "appearance", we actually entered the control panel of Google custom search. Control Panel-appearance → select layout. Here we need to choose a 2-page layout, otherwise the search results can not open a new page. Remember to click Save and get the code, copy the complete code and record it.

  

2, select the "website" label. If you still have the site you need to add, you can add it here, otherwise you can skip this step. The newly added web site format is still: www.i7086.com/*

  

3, select the "Get Income" label. Here is the Google AdSense account with the binding page, that is, in your search page to add Google adsense ads. According to the requirements of your registered Google AdSense email, postal code, registration phone number after 5 digits, regional settings preference to choose Chinese. Submit!!

  

After submitting you will receive a confirmation email, please click on the link in the email to authorize Google to customize the search associated AdSense account.

  

4, if you forget to record the unique ID of the search engine, you can then select "Basic Information" in the control Panel to see your ID.

Four, Google custom search and WordPress perfect to fit

1, please find the search.php file in your subject file, copy the complete code of our record to the search.php file, and create a new search page in the theme background, use the searching template, and publish the page.

  

2, if the theme Control Panel has search control options, then to the theme Control Panel to fill out the search engine's unique ID and Google search results page links, after the completion of the completion of the Google custom search and WordPress perfect to match. For example, mine is Http://www.i7086.com/search.

  

Original: Http://www.i7086.com/googlezidingyisousuodazaowanmeizhanneisousuoyinqing



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.