WordPress Site Search

Adding search functionality is a wonderful way to add functionality and pleasure to a visitors experience on your website and there are many wonderful ways to add WordPress site search to your website: 

<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">

<div><input type="text" size="18" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" class="btn" />
</div>
</form>

If your templates supports it you can just add:
<?php include (TEMPLATEPATH . '/searchform.php'); ?>

(like "Write your search and hit Enter" )

<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
<div><input type="text" size="put_a_size_here" name="s" id="s" value="Write your search and hit Enter" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"/>
<input type="submit" id="searchsubmit" value="Search" class="btn" />
</div>
</form>

 

Here is an example of how this should look...

 How to quickly add site search to your WordPress website.


If you've tried all of the above steps and the search form does not display, you may need to contact our support for assistance. We may be able to help you identify and resolve the issue.



 

  • 210 Users Found This Useful

Was this answer helpful?

Related Articles

WordPress Error Establishing a Database Connection

WordPress Error Establishing a Database Connection In a nutshell, you are getting this error...

WordPress error "This file cannot be imported - It may be caused by file_uploads being disabled in your php ini"

The following error may be received if you attempt to upload a theme or file larger than the...

Not Receiving Form Email Through WordPress - SMTP

For anti-spam reasons be sure that the email address you are using to send from, exists in your...

Wordpress Error Missing a temporary folder

The "Missing a temporary folder" error in WordPress is caused by incorrect PHP settings on your...

How to disable WordPress comments, pingbacks, and trackbacks

There are a few ways to disable comments, pingbacks and trackbacks in WordPress:   Go to...