-
Notifications
You must be signed in to change notification settings - Fork 0
/
searchform.php
35 lines (29 loc) · 1.18 KB
/
searchform.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<form role="search" method="get" id="searchform" class="searchform search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<button type="submit" class="btn btn-search">
<i class="fa fa-search"></i>
</button>
<div class="input-group form-group">
<input type="text" class="form-control form-keyword" placeholder="Search others" value="<?php echo get_search_query(); ?>" name="s" id="s">
<?php
$selected = 'any';
if ( isset( $_GET['post_type'] ) && ! empty( $_GET['post_type'] ) ) {
$selected = $_GET['post_type'];
}
$search_type = array(
'any' => 'All',
'posts' => 'News',
'transportation' => 'Transportation',
'passenger_guide' => 'Guide',
'shop' => 'Shop',
'service' => 'Service',
'facility' => 'Facility',
'transit' => 'Transit',
'blog' => 'Blog',
'advertisement' => 'Advertisement'
);
?>
<div class="input-group-btn form-select hidden-xs">
<?php ais_select_options( 'post_type', $selected, 'class="form-control"', $search_type ); ?>
</div><!-- /btn-group -->
</div><!-- /input-group -->
</form>