Custom Google Search Provider with an Open-Search Auto Discovery for a WordPress Site
Since I spent the last half an hour doing this for one of the student WordPress websites (NCKU IIMBA Student Council), might as well explain how it’s been done. Shouldn’t take anyone more than 20 minutes.
First, you’ll need to make a Google Custom Search. I’ve made one for the students, and you can take a quick look at the NCKU IIMBA student search and what a general results page would look like. It shows you all results but emphasizes a few websites that are important for students studying in NCKU-Tainan. A few possible search refinements were added (“Tainan”, “NCKU”, “Taiwan”, “IIMBA”).
The next step was to make an auto-discovery OpenSearch XML file, so that the students can add this search to the browsers (Internet Explorer 7 and above, Firefox 2 and above). Haacked does a good job explaining that one with “Integrate Your Custom Search Engine With The Browser”.
My XML file ended up looking like this :
<?xml version="1.0" encoding="UTF-8" ?>
<ShortName>NCKU IIMBA Search</ShortName>
<Tags>NCKU IIMBA INCKU students student </Tags>
NCKU IIMBA search
and that’s it, we’re done.