zakka zakka

漫文 (Twitter)

Archive for the ‘how to integrate’ tag

Integrating Google Search into Wordpress

someone said something

I’ve just changed my Wordpress theme and doing some customizations. I’m not using any plugins for Google Search so I thought I’d share this simple way of integrating it into Wordpress whilst keeping the theme. Everything has been simplified thanks to the improved Adsense for Search.

1. Login to your Google Adsense account, go to Adsense Setup and click on Adsense for Search. Select your desired settings and click Continue. Choose your look and feel and click Continue again. For Opening of search results page, select Open results within my own site and enter “http://yourdomain.com/search-results.php” (without the quotes). Complete the rest of the settings and hit Continue again. You’ll get to Name Your Search Engine, then hit the Submit and Get Code button.

2. There will be two code snippets for you to copy, Search Box Code and Search Results Code. Firstly, copy the Search Box Code. Go back to your Wordpress and Design a Widget, add a Text widget to your sidebar. Edit your Text widget and paste your Search Box Code inside, Save Changes.

3. Next, Write a new Page in Wordpress and give it a title “Search results” (this will generate a page named http://yourdomain.com/search-results.php), uncheck all the fields under Comments & Pings. Now go back to Google and copy and paste your Search Results Code into your Post and Publish.

And there you have it! A personalized Google Search results page!

Related posts

August 23rd, 2008 at 10:51 pm