searchform.php only returns results from posts' "title"
-
I’m somewhat of a beginner with PHP, so please bear with me…
I am using the Job Board theme by Templatic for the website https://www.helpershand.com. My problem lies in the file ‘searchform.php’. When I search my site, it only queries results by the title of the post and nothing else. I want to be able to search, say “Omaha” and it finds posts with “Omaha” as the location.
Does this make sense? Again, I know that I have to do this in searchform.php but I just don’t know what line of code will make this work. Here is my current searchform.php code:
<?php if($_GET['s']) { $s = $_GET['s']; }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>
- The topic ‘searchform.php only returns results from posts' "title"’ is closed to new replies.