Google coop is a natural companion to Wordpress (or other types of) blogs. Here's how I setup Google coop on the Informed Banking Blog:
- Setup Google coop search engine, following their instructions
- Create a new page template in Wordpress - I copied wordpress/wp-content/themes/default/page.php to ./googlesearchcoop.php, but you can just create a new file just as easily:
- Edit the page template so that you can edit it in the Wordpress Theme Editor:
Template Name: Google Coop Search Setup*/?>?
- You'll probably want to add your theme's header and footer:
<? php get_header(); ?>
<? php get_footer(); ?>
- Go back to Google coop, choose your custom search engine, then select control panel, click code, and the second option down is "Search box and search results code for your website", expand that, then enter the target url (I used my blog URL)
- Then click Save Changes, and then copy and paste the code from the text areas, and paste them into your new Wordpress page template, between the header and footer snibbets.
- This is the key step: add a new page using the Wordpress "Write Page" tab, save an empty page using your new page template (expand the Page Template tab on the right hand side, and you should see your new template).
- Once you've created your new page, click on "View page" and note the URL. If it has "?pageid=somenumber", then you'll have to add that as a hidden input variable in the Google coop form. In my case, this is the element I use:
<input type="hidden" name="page_id" value="16"/>
I'm not sure if that last step is required, but I did it and it works. :-)
Last but not least, the working example:
Informed Banking Google coop Search Engine