Search by dropdown?
-
Hi ??
I love your plugin. It’s great because it’s simple. I just have one problem. I’m trying to change ‘text’ field to drop down with options taken from database. To change meta keys I used function from your FAQ. And in ‘author-search.php’ I put this code:
global $wpdb; $qry1 = "select * from wp_terms"; $reg1 = $wpdb->get_results($qry1); if(!empty($reg1)) { echo '<select>'; foreach($reg1 as $row1) { echo '<option class="field" name="as" id="sul-s" value='.$search.'>'.$row1 -> name.'</option>'; } echo '</select> '; }
Drop-down works well, but when I will choose the option and search, I see all users.
Is there any way to fix it? Or is it because I am taking data from other database table?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Search by dropdown?’ is closed to new replies.