10
November
2009
How to Use Custom Google Search in Wordpress
Using a custom Google Search on your Wordpress site is not as daunting as it looks, especially if you are inclined on using plugins, such as the Google Custom Search Plugin.
However, if you’re more hands-on in terms of your site design and layout, fret not. It’s not that hard. You just need to know how to manually edit and upload some files. Just follow the steps outlined here, and you’ll surely be able to do it.
Step 1: Create the custom Google Search box in your Google Adsense account
Go through the wizard for creating the Google Search for Content. If you wish to customize the look and feel of the search results page and display the results in your own site, follow the succeeding steps below. If you’re ok with having Google handle the results page, just follow until Step 2a.
Step 2: Add the generated code
Step 2.a: Insert the search box code
After generating the code from Google, open your header.php file (or the file where your original search box is located, e.g. sidebar.php). Overwrite the existing code with the new one you just generated, and tweak the layout and design around if you’re comfortable.
Step 2.b: Create a page for your results
Create a new Page in your Wordpress Dashboard (Pages -> Add New). Paste the results code you generated on the HTML tab of the page you just added (see the first screenshot on this post). Publish the page.
(Optional) Step 3: Change the search page template and hide the results page from the navigation
If you have a search.php template, change the template on your Page options.You can also edit the visibility of the page on your navigation bar by excluding the new page you created. I will detail how to create your own page template and how to exclude links from your page navigation bar in succeeding posts.
Easy fix: Just add a plugin such as WP-PageNavi to hide pages you don’t want displayed.
Related posts:
- Fixing Wordpress Stats Plugin Showing No Visitors Designing and creating a Wordpress theme from scratch can be...
- Allow Wordpress Blogs to Update in Real-Time through PuSH/PubSubHubbub The PuSH protocol is gaining more and more recognition nowadays....
- Layout Your Site from Scratch with 960.gs Now you're really spiced up to create your own site...
- Create and Host Your Own Domain for Free in Less Than 10 Steps For personal sites, it's often not a priority to create...
- Search Similar Images Faster through Google Similar Search has officially graduated from Google Labs. If only...
Related posts brought to you by Yet Another Related Posts Plugin.
Nathan



Follow Me 



Affiliates 



Category
Tags
Blogroll
Archives
Meta
About the Author
My Projects 
This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.
Leave a Reply