PDA

View Full Version : problem with search form



trevanhetzel
05 Jan 2011, 06:10 PM
I have an issue that I am desperately seeking help for...(I've tried so many forums and nobody has answers).

What I am trying to do is modify the "searchform.php" file on my wordpress theme to search for and display results for multiple "id's" (don't know if this is the right terminology as I'm fairly new to PHP). Basically what is going on is the search form only picks up results from posts' titles, but I want it to display results from other parts of the post too, like location, job type, and description.

You can see the site I'm working on here: http://www.helpershand.com

If you do a search, the search results page will only display results if you queried a keyword that happens to be in a post's title, not the rest of its content.

Please let me know if I'm not making sense! I would appreciate all the help I can get with this issue. Thanks!!!

Here's my current searchform.php code:



<?php
if($_GET['id'])
{
$s = $_GET['id'];

}else
{
$s = FIND_A_JOB_TEXT;

}


?>

<div id="search">
<form method="get" id="searchform" action="">
<input type="text" value="<?php echo $s;?>" name="s" class="s" onfocus="if (this.value == '<?php echo FIND_A_JOB_TEXT;?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php echo FIND_A_JOB_TEXT;?>';}"/>
<input type="image" src="<?php bloginfo('template_url'); ?>/images/none.png" alt="" class="sgo" />
</form>
<a href="<?php echo get_option('siteurl');?>/?page=advance_search" class="advance_search"><?php _e('Advanced Search')?></a>
</div>