Dave Kaufman
Member
Posted 3 years ago #
After searching exhaustively in the forums, I am stumped as to how to add a simple wordpress specific search form to an HTML page that will search a single wordpress blog install.
WordPress's sidebar search is built to be included in a PHP page with the existing wordpess framework otherwise it would be perfect. I would like my results to end up on wordpress blog's search results page if possible.
Dave Kaufman
Member
Posted 3 years ago #
I did try to add this to the header area:
<?php require_once("./members/wp-blog-header.php"); ?>
Where members is the name of the directory where the blog is, and then this snippet in the area I wanted the search field:
<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>
I got the idea from an article titled:
Execute External WordPress Functions
http://perishablepress.com/press/2006/08/27/execute-external-wordpress-functions/