Using Adsense for Search with WordPress

  • Posted On: March 21st, 2007
  • Filed Under: Web Design

This one totally slipped under my radar until today.

Did you know that Google has added an "open results within my own page" option to their AdSense for Search program? Now, rather than sending readers to an off site search result page you can actually build a local template to handle search results on your site! Using some tricky JavaScript Google actually generates search results and places them within your own page.

One of the major reasons I wasn't using AdSense for Search originally was it's lack of customization options. Beside being unable to customize the search box I was also disappointed with the lack of options for customizing the results page. That's all changed today.

While Google still restricts a lot of your options for displaying results (you can't display results in a space smaller than 500px) they have opened up a lot of potential. On this site, for example, I've managed to build a new WordPress theme page specifically for handling Google Search Results. Using a custom page templates, a blank page, and some code from Google you too can get AdSense for Search working in WordPress!

Here's how it works: Read the Rest of this post

Print only Part of a Website

Every once in awhile I re-learn something I already knew and am forced to slap myself in the forehead. Earlier today I wrote a short article on creating a print.css file for your website or blog. This is kind of a quick partner post for those folks who are forced to deal with sites that don't offer up a good alternate stylesheet for printing purposes.

As I said - this is something I knew but forgot.

Print SelectionDid you know you can highlight text on a webpage and then only print that text without copying and pasting it? Simply highlight a block of code and then click file->print. About partway down the screen you'll be shown a dialog which gives you the choice of printing the whole document, a range of pages or simply the selection. The "selection" option will only be available if you've already highlighted text.

This is ideal for when you don't want to print a header, a sidebar, comments or even partial blocks of text. It works in both Firefox and IE - I don't know about any other browsers though.