-
Notifications
You must be signed in to change notification settings - Fork 1
/
searchform-custom.php
106 lines (97 loc) · 3.73 KB
/
searchform-custom.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php ?>
<div id="search">
<div class="wrap">
<div class="data-column-wrap">
<form id="fp_filter_filters" action="<?php echo site_url() ?>/wp-admin/admin-ajax.php" method="POST">
<!-- Region Select field -->
<div class="data-column data-column-4">
<?php $regionargs = array(
'show_option_all' => '',
'show_option_none' => '',
'option_none_value' => '',
'orderby' => 'ID',
'order' => 'ASC',
'show_count' => 0,
'hide_empty' => 1,
'child_of' => 0,
'exclude' => '',
'include' => '',
'echo' => 1,
'selected' => isset( $_GET['region'] ) ? $_GET['region'] : '',
'hierarchical' => 1,
'name' => 'regionfilter',
'id' => 'regionselect',
'class' => 'chosen-select',
'depth' => 0,
'tab_index' => 0,
'taxonomy' => 'region',
'hide_if_empty' => false,
'value_field' => 'id',
'multiple' => true
); ?>
<?php wp_dropdown_categories( $regionargs ); ?>
</div>
<!-- // Region Select field -->
<!-- Branche Select field -->
<div class="data-column data-column-4">
<?php $brancheargs = array(
'show_option_all' => '',
'show_option_none' => '',
'option_none_value' => '',
'orderby' => 'ID',
'order' => 'ASC',
'show_count' => 0,
'hide_empty' => 1,
'child_of' => 0,
'exclude' => '',
'include' => '',
'echo' => 1,
'selected' => isset( $_GET['branche'] ) ? $_GET['branche'] : '',
'hierarchical' => 1,
'name' => 'branchefilter',
'id' => 'brancheselect',
'class' => 'chosen-select',
'depth' => 0,
'tab_index' => 0,
'taxonomy' => 'branche',
'hide_if_empty' => false,
'value_field' => 'id',
'multiple' => true
); ?>
<?php wp_dropdown_categories( $brancheargs ); ?>
</div>
<!-- // Branche Select field -->
<!-- Advanced Custom Field date fields -->
<div class="data-column data-column-4">
<?php // get custom field from post type
$field = get_field_object('field_59bfd40499af7');
$choices = $field['choices'];
?>
<select name="kampagne-typ" id="kampagne-typ" class="postform">
<option value="" selected="selected"><?php _e('Typ', 'fptheme'); ?></option>
<?php if( $choices ): ?>
<?php foreach ($choices as $key => $value): ?>
<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
<?php endforeach; ?>
<?php endif; ?>
</select>
<input type="hidden" name="fp_filter_posts_per_page" id="fp_filter_posts_per_page" value="-1"><!-- or: echo get_option( 'posts_per_page' ) default value from Settings->Reading -->
</div>
<!-- // Advanced Custom Field date fields -->
<div class="data-column data-column-4">
<input type="hidden" name="action" value="fp_filter_filter" />
<button class="search"><span class="icon-lupe"></span></button>
</div>
</form>
</div>
</div>
<div class="search-graphic"><img src="<?php echo plugins_url('includes/images/search-graphic.png', dirname(dirname( __FILE__ ) )); ?>" /></div>
</div> <!-- #search -->
<div class="dreieck-blue"></div>
<div class="wrap">
<div id="mapwrap"></div>
<div id="fp_filter_posts_wrap">
<?php kampagnen_liste();?> <!-- this is not a main query but a custom query calling cpt 'kampagne' -->
</div>
</div>
<?php ?>