Trying to search custom fields. Probably not going to use the default search box. Does anyone have any code for this?
Search custom fields
I just used wordpress search and filled my select box with a s2 custom field
bascially I have a check box group that is the same for all members (like categories). I used this code below to loop thru those and give me my select options, set the value of select to s2-s (s2 search querystring) and queried my member page.
<form get="get" class="" action="MemberPageURL">
<select value="homesearch" name="s2-s">
<?php
$fields = get_s2member_custom_fields();
$exploedey = $fields["service_type"]["config"]["options"];
/**/
$pos = explode("\n", $exploedey);
$arrayName = array();
foreach($pos as $key => $str)
{
$str = explode('|', $str);
$pos[$str[0]] = $str[1];
$arrayName[] = $pos[$str[0]];
}
foreach ($arrayName as $value) {
echo '<option value="'.$value.'">';
echo $value;
echo "</option>";
}
?>
</select>