Search Your Blog from Anywhere

by MD on 2009/03/12

If you want to have search functionality in your self-hosted wordpress blog, anywhere other then the default option provided by theme, you can do so by adding following code in your php file, exactly where you want this function.

<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
  <div>
    <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="Search" />
  </div>
</form>

You may also like:

Leave a Comment

Previous post:

Next post: