Enhance wordpress search form to allow searching posts in certain category(s), month archive(s) or tag(s).
Your theme's "searchform.php" file may looks like below, with some other codes:
....
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>">
<input type="text" id="s" name="s" value="<?php the_search_query(); ?>" />
<input type="submit" id="searchsubmit" value="Search" />
</form>
...
add the <?php if(function_exists('esf_add_form_field')) esf_add_form_field(); ?> code to proper place inside <form> element, in most cases you can put it just after <input type="submit" value="Search" /> button and before </form> close tag.
That's all. You may want to add css styles to make search form nicer.
Requires: 2.7 or higher
Compatible up to: 2.8.4
Last Updated: 2009-9-18
Downloads: 6,397
Got something to say? Need help?