These steps will use google adsense method for adding a search box to your site. If you don’t want to use google search on your site you will have to figure out how to make your own search results with the following information:
2) Search template
I have never build that so I cannot support you with it.
So now back to the adsense method:
Step 1) On your website create a new page and call it Search Results
I assume you already have an adsense account, if not then it is time to create one first
Step 2) Go to “My Ads” on top and then to “Search” on the left hand side
Step 3) Click on “new custom search engine”
Step 4) In the new screen you do the following
Fill in name:
Change “What to search” to “Only sites i select”
Fill in the URL to your website
Change country and language to the correct one for your site
Open the extra option for “Search results”
Select “on my website using an iframe”
Fill in the full URL to the page you created on Step 1 in the box for “URL where search results will be displayed:”
So it will look like this:
Step 5) Click on Save and get code
Step 6) Copy the Search box code in notepad. Now adjust this line:
put name="q" size="55" type="text" />
and replace it with:
put name="s" size="55" type="text" />
You can also change the size if it is too width for your site.
Step 6) The search box code is basically your search bar. You can put that anywhere in your template or use it in a text widget. If you want to use a widget use the Text widget and paste the “Search box code” there:
* if your site does not support widgets go to the creator of your template and they will help you with that.
Step 7) Edit the page you created in step 1 and paste in the content of “Search result code” from adsense.
Step 8) Paste [display_search] just below or above the text from google in step 7
Now you have your seach results and it will also show you the items there.