Google Best 3+ search box search code for blog website

May 6, 2011

Best 3+ search box search code for blog website

How to place place adsense search box in blog,how to place search box in blog ,website-was I looking for.Then I found the solution.

Search box within a website,thats an important feature.To contain a visitor browsing through pages search box optimization is one of the tools and thats a fact.When user intend to look for something and if it is there and they find easily ,thats a bonus.And this can be done by placing a search box.


search box code and basic

There are several options for a search box.Generally it is of two types.

One is search a topic within the blog or website , it may be named as local search.If there is any related topic in your website or blog this will be shown in the search result.

Another is search this topic within the entire world ;for this best option is GOOGLE search.In this case you are providing the user to search google in your website.In search result your blog or website entry may not come.


A simple search box code-search within the blog or website


The search result opens in a new page.Target="_"blank used here.



Demo:










[Code]



<form class="search-this" action="/search" style="display:inline;" target="_blank" method="get"> <input class="my-search-box" style="padding:3px 3px 3px 3px;" value="Search" name="q" size="25" type="text"> <input class="my-search-btn" style="padding:3px 3px 3px 3px;value="Search In This Blog" type="submit">
</form>








Google search box code


You can add a google search box in your website.But keep in mind that this search is globally not within your own website or blog.

This google search box can be integrated with adsense.Thus you can earn mony if user search with this search box.

To earn by google search box ,you have to add your own adsense publisher id in the search box code.

To get this search work with your adsense account get your own publisher account + adsense search id, mine is partner-pub-0477901380458766:5697284869

0477901380458766 for adsense and 5697284869 for adsense for search.




Demo:












[Code]



<form action="http://www.google.com/cse" id="cse-search-box" target="_blank">
<div>
<input type="hidden" name="cx" value="partner-pub-0477901380458766:5697284869" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="30" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>








Combination of google search and local search-Recommended


This dual search box combines the both search option within the blog and globally.But keep in mind that this way when you let user search in your blog,the result will be fetched from google indexed data.

So a new blog post that is not yet indexed by google will not be shown in the search result.

But it is recommended to use this dual search box,as you intend to earn by adsense. enjoy.



Demo:















[Code]



<form action="http://www.google.com/cse" id="cse-search-box" target="_blank">
<div>
<input type="hidden" name="cx" value="partner-pub-0477901380458766:5697284869" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="25" />
<input class="srch"type="submit" name="sa" value="Search" />
<input type="radio" name="sitesearch" value="" />
The Web
<input type="radio" name="sitesearch"
value="w3onlinesource.co.cc" checked />This Blog<br />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
<style type="text/css">
.srch
{
background:#190707;
color:white;

border:2px groove #A4A4A4;
border-radius:2px;
-moz-border-radius:2px;
}
.srch:hover
{border:2px groove #181907;
background:#38610B;
}

</style>





No comments:

Post a Comment