How many people do you know with the Google Toolbar installed on their web browser? Wouldn’t it be great if you could put YOUR site onto the toolbar?
Actually, you CAN - and the process is pretty dead simple! While this is not a WordPress “feature”… it’s easy to do with WordPress, or any other site for that matter.
To put your custom button onto the Google toolbar, you need to do three things:
- convert an image into base64 code,
- create and upload an xml file to your web server,
- put a link on your web page for people to click on.
So here’s how…
Step 1 - Convert The Image
We’re looking at something that’s 16×16 pixels here - probably you’ve already done a favicon for your site - that will do nicely.
Now click this link to encode that piccie into base64 code - don’t worry - it won’t hurt a bit. Just click CHOOSE FILE and find the favicon on your hard drive, and then click CONVERT THE SOURCE DATA.
The copy and past the data returned, into a new text file. You’ll use it in the next step.
Step 2 - The XML Code
I’ve reproduced some sample code below. It’s the same code I use for this site… minus the image data.
All you have to do is
- Copy and Paste this code into the text file you just created.
- CAREFULLY change the domain name to point to YOUR site/wordpress installation.
- Change the title and description bits - keep the title SHORT and don’t use any HTML code or & ampersands.
- Insert the icon code obtained from step 1 where shown.
- SAVE it as a text file - call it googletoolbar.xml and
- Upload to your web server at the root level.
Here’s the XML code:
<?xml version="1.0" encoding="UTF-8"?>
<custombuttons xmlns = "http://toolbar.google.com/custombuttons/">
<button>
<title>Your SHORT title</title>
<description>YOUR Site Description shows in mouseover of icon</description>
<site>http://yourdomain.com</site>
<search>http://yourdomain.com/index.php?s={query}</search>
<send>http://yourdomain.com/index.php?s={selection}</send>
<feed refresh-interval="3600">http://yourdomain.com/feed/</feed>
<update>http://yourdomain.com/googletoolbar.xml</update>
<icon mode="base64" type="image/x-icon">insert base64 code here</icon>
</button>
</custombuttons>
Note - these links are set up for a WordPress installation in the home directory. If you have WP in another directory, you would need to add it into the path names above.
If you use a different SEARCH url, make sure you adjust the search and send URLs as appropriate, or leave those lines out out altogether if your site has NO search mechanism.
Step 3 - Link To It
Now all you have to do is include a special link to your file and encourage people to click on it to add you to their Google toolbar! Put that link in your sidebar or other obvious place!
Here’s the final link you’ll need (obviously change to your URL first)
http://toolbar.google.com/buttons/add?url=http://yourdomain.com/googletoolbar.xml
Go on… give it a try - click here to install ME on your Google toolbar (I’ve also put this code in my sidebar…)
If you don’t have the Google toolbar installed, or perhaps don’t have the latest version, it will also prompt you to install or update the toolbar.
A Couple of Notes
Whatever’s typed into the Google search box on the toolbar can ALSO be searched at your site, simply by clicking your icon. If there’s nothing typed there, clicking the icon will take you straight to the home page.
Likewise, if some TEXT is selected on the page, clicking your icon will search your site for that text.
Your latest feeds are shown by clicking the arrow next to the icon. I changed the feed refresh-interval from 3600 (1 hr) to 43200 (12 hrs) because I don’t want my server hit any more often than that.
The update link shows where the latest version of your toolbar icon lives. To update a previously installed button, go to Settings, Options, Buttons, click on your custom button, then Edit, then click the Update Button link near the top.
Here’s some detailed information from Google on what the codes all mean.
Google toolbarIf you like this post, buy me a coffeePopularity: 9% [?]
















