Word Press

Google Custom Search integration

Posted in Word Press on January 18th, 2010 by admin – 6 Comments

In this tutorial, we will integrate Google Custom Search to our word press blog.

Sign up from : http://www.google.com/cse/

If you already have Google AdSense Account.Sign in and follow the instructions given below.

Step 1 : Creating your search result page

Open your word press admin page.Page > Add new page.

Type your search page title, leave your content blank and publish it. After you publish check your page link and note it somewhere as you like.Mine is:http://www.okanonat.com/search-results/


Step 2 : AdSense Setup tab > Get Ads > AdSense for Search

Start configure your search box.

Step 3 : Choose Search Type



Step 4 : Choose Search Box Options

Step 5:  Search Results Style

Do not forget to fill your search result page link!

Step 6: Save your settings

Step 7: Get Search Code

Now, you got 2 codes.First one is for your search form and second one is for your Search results.if you remember in step 1 we publish our search result page. Copy all of the second box code and paste it your content as html.

Final Step is paste your google custom search box.In word press admin panel choose Appareance tab and go to widgets.Drag text widget into sidebar ( if your theme is not support widgets.Paste code to sidebar.php in your theme directory.)

You can see demo top of the sidebar.