Success Amateur Blogger | This is a Personal Blog of Mine
How To Install Google Custom Search With Search Result Within Your Website The Easiest Way
I have install google custom search at my website.
You can see it neatly at the top of my right sidebar.
Benefits of Google Custom Search
?
With Google Custom Search, you can give a better search experience to your website visitors. ?As we all might know, Google is the LARGEST SEARCH ENGINE?nowaday, right at the time of this post was written.
Being the largest and top is not as simple like what you may think.
It needs a technology that advance than the competitors.
Hence, Google’s technology in indexing and searches is the best!
Not even the built in WordPress search feature.
Other than that, you can combine all your websites in one search result if it having the related keywords.
In other words, you can limits the search result to only websites of your like. Example, your own websites.
Other benefit that might interest you,
you could monetize your search result while giving the best to your visitors.
?
Cons of Google Custom Search
Will not return result of unindexed pages of your website.
?
?
Installing The Google Custom Search Which Returns The Search Result In Your Website
This example is done with wordpress default theme.
First thing we have to do is getting the code of google custom search.
To do this, you have two option, using adsense or directly to google custom search website.
But both wizard is identical, so don’t worry much about it.
At the first page of the wizard, fill all required field to your like and then click continue.
At the second page of the wizard, you are presented with options on how to customize the look of your search form.
My recomendation is please make the text box lenght to 18 or shorter than that according to your sidebar width.
But if you planning to put your custom search on more wider placement, you can make the number greater.
The third wizard show you an option on where the search result will come out.
Please select?Open results within my own site?.
Before you fill out this field, please open a new window/tab on your browser and login to your wordpress dashboard and make a new page.
Click save draft?and the permalink of the page will be visible underneath the title field area.
Copy the permalink and paste it on the field at the google custom search wizard just now.
You can customize the color palete according to your site scheme color.
After that, you will have two codes, one for the search form, and one for the search result.
?Now let’s get our hand dirty with these codes.
Open the page.php?of your theme and find this code.
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
Paste the code of the search result under this code or replace it.
After that, paste the code below at the very top.
?
<?php
/*
Template Name: Google Search Result
*/
?>
The code above will register this template page into wordpress.
Now save as googlesearchresult.php
After that, upload this new page template into the theme folder.
In this example, upload it to wp-content/themes/default
Now edit the draft that we made before and make sure the page template is Google Search Result?and then publish this page.
The next step you should do is go to appearance ==> widget ==> and add text widget.
Paste the search form code there.
Click done and then click save.
We are done!
| Print article | This entry was posted by Pangeran Wiguan on Saturday May 2 2009 at 9:44 PM, and is filed under Blogging Tips, My Blogging Journal, Web Development. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |





about 1 year ago
hye …thanks for the tips..give me a lot of information about google custom search
…anyway do you have tips about dofollow for blogspot?
about 1 year ago
I’m afraid I do not know much about blogspot buddy…
about 1 year ago
Cool! Thanks for sharing it!
about 1 year ago
Very good tips! And cool blog
about 1 year ago
When I first coded the Google Custom search I did it it a little bit different, I am liking the way you are doing it here, and I might try it out on my personal website =D
Till then,
Jean
about 1 year ago
Thanks for this tutorial, I currently just have the regular wordpress search but on other blogs I have Google search and it earns a bit of money.
about 11 months ago
It looks nice on your site Pangeran, I think I will try this on my new blog, thanks a lot for the tutorial.
about 11 months ago
huh huh this is what i was searching for
great article
thanks