Here is the searchform.php and search.php where this code works. The theme is Atahualpa 3.2 at this URL http://wordpress.bytesforall.com.
Please look at it and tell me how to modify the Socrates them to do the same thing.
Code:
SEARCHFORM.PHP
<form method="get" class="searchform" action="<?php bloginfo('url'); ?>/">
<table class="searchform" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="searchfield">
<input type="text" class="text inputblur" value="<?php the_search_query(); ?>" name="s" />
</td>
<td class="searchbutton">
<input name="submit" value="Search" type="image" src="<?php echo get_bloginfo('template_directory'); ?>/images/magnifier2-gray.gif" style="display: block; border:none; padding: 0 0 0 5px; margin: 0;" />
</td>
</tr></table>
</form>
Code:
SEARCH.PHP
<?php
global $options;
foreach ($options as $value) {
if (get_option( $value['id'] ) === FALSE) {
$$value['id'] = $value['std'];
} else {
$$value['id'] = get_option( $value['id'] );
}
}
if ( is_page() ) { global $wp_query; $current_page_id = $wp_query->get_queried_object_id(); }
?>
<?php get_header(); ?>
<!--p align="center">Your search for '<strong><font color="#FF0000"><? echo $_GET["s"] ?></font></strong>' returned the following results:</p-->
<p align="center">Your search for '<strong><font color="#FF0000"><? echo $_GET["s"] ?></font></strong>' returned the following results:</p>
<p>
<?php
function phpBaySearch($term) {
$keyword = $term;
$category = "";
$text .= '[phpbay]' . $keyword . ',20,' . $category . ', ""[/phpbay]';
echo phpBayPro($text);
}
phpBaySearch($_GET["s"]);
?>
<?php
function phpZonsearch($term) {
$keywords = $term;
$text .= '[phpzon keywords="'.$keywords.'" num="10" country="US" searchindex="All" templatename="default" paging="true"]';
echo do_shortcode($text);
}
phpZonsearch($_GET["s"]);
?>
</p>
<?php get_footer(); ?>