views:

9

answers:

1

Hi,

I need to incorporate a "Search" feature within my WordPress CMS site that I am currently developing and was hoping to attach this feature/plugin to the following piece of code and unsure how to do this in WordPress, i.e.:

            <div id="search_box">
              <form method="get" action="/search" id="form">
                <input name="white_box" type="text" class="search" value="Search site" size="19" maxlength="80" id="white_box" onfocus="if (this.value=='Search site') this.value = ''"/>
                <input name="submit" type="image" class="submit" value="submit" src="images/search_btn.jpg" />
              </form>
            </div>

I basically want to incorporate a "Search" feature on my site.

Any help would be great.

Thanks.

A: 

This a very basic WordPress search form. See the difference in the form action URL?

<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
   <input type="text" size="14" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" class="s" />
   <input type="submit" id="searchsubmit" value="<?php _e('GO'); ?>" />
</form>
songdogtech