X

Firefox opensearch and your blog

Add this code to a text editor and save as opensearch.xml then upload to your root dir. This will let users add your website as a search engine within Firefox like Google, Bing, Wikipedia and others. Now visitors can change their search option and select your blog.


<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> 
  <ShortName>wpsnipp.com (code search)</ShortName> 
  <Description>Search wordpress code snippets</Description> 
  <InputEncoding>UTF-8</InputEncoding> 
  <LongName>WP Snipp Search</LongName> 
  <Image height="16" width="16" type="image/x-icon">http://wpsnipp.com/favicon.ico</Image> 
  <Url type="text/html" method="get" template="http://wpsnipp.com/?s={searchTerms}"/>  
</OpenSearchDescription> 

Update

Thanks to Dale pointing out I was missing this part, I completely forgot apparently. Yikes. Place the snippet of HTML into the header.php of your wordpress theme.

<link title="wpsnipp.com - Search" type="application/opensearchdescription+xml" rel="search" href="http://wpsnipp.com/opensearch.xml">

Comments  Leave a Reply

  1. Seems you also need to add the following to your themes header.php, in order to get Firefox to recognise the opensearch.xml file…

    Once added you can then select your site as a search plugin like Google, Bing and Wikipedia etc.

    1. Whoa, good call Dale I completely forgot to add this in the sample, thanks!

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!