Your blog in the browser search bar!

Dear readers, if you are using Firefox or Internet Explorer 7, did you noticed something?
Did you noticed something?
(Click to enlarge picture)

Do you know what do this mean?
This means you can add this to your browser’s search bar! Then search can be made without loading to your blog first!

Add your blog to the search bar!
(Click to enlarge picture)

Well, in this post i will teach you how to do this for your blog! Haha

What do you need:
A (wordpress) blog [since i havent try this with others platform’s blog]
Notepad (or any text or xml editor)
Mozilla Firefox or Internet Explorer 7

Step by step:

1. Firstly, you will need to create an XML file. Copy the following code into a notepad and save it as myopensearch.xml

<?xml version="1.0"?>
<OpenSearchDescription 
xmlns="http://a9.com/-/spec/opensearch/1.1/">
  <ShortName>SHORT_NAME_OF_YOUR_BLOG</ShortName>
  <Description>BLOG_DESCRIPTION</Description>
  <Url type="text/html" 
  template="http://BLOG_URL/index.php?s={searchTerms}"/>
  <LongName>YOUR_BLOG_LONG_NAME</LongName>
</OpenSearchDescription>

And of cos change the details accordingly for your blog:
– SHORT_NAME_OF_YOUR_BLOG – change to your blog name (i.e. joshuatly.com v2)
– BLOG_DESCRIPTION – brief description of your blog
– BLOG_URL – Your blog url (i.e http://www.joshuatly.com)
– YOUR_BLOG_LONG_NAME – your blog name

2. Then upload the file myopensearch.xml to the root directory of your blog!

3. Go to the theme editor under the Design (via admin screen) and open header.php. Find the following code.


<link rel="pingback" 
href="<?php bloginfo('pingback_url'); ?>" /> 
 

4. Insert the following code below the above code. Change the YOUR_BLOG_NAME and BLOG_URL to your blog name and your blog path accordingly.

<link rel="search" title="YOUR_BLOG_NAME" 
href="http://BLOG_URL/myopensearch.xml" 
type="application/opensearchdescription+xml" />

Save the header.php and thats all! You will be able to see the change immediately!

Credit to/Source: eches.net

joshuatly2008

, , , ,

2 Responses to Your blog in the browser search bar!

  1. Import from China July 24, 2008 at 3:43 pm #

    I came across this blog the other day and you got some great info here – thanks.

  2. VOY July 24, 2008 at 7:51 pm #

    nice tutorial here. thx a lot 😀 very convinience.

Leave a Reply

Creative Commons License