ACF filter with select/options

I have build a list with ACF and want to make a filter selection, witch is working halfway. i have at the moment to selectors, but i can only filter at one of them at the time. I can’t seem to get i to work any idea what is wrong here:
This is the selectors:

‘Alle’ => ‘Alle’,
‘Ledig’ => ‘Ledige’,
‘Optaget’ => ‘Optaget’,
‘Reserveret’ => ‘Reserveret’,
‘Snart ledig’ => ‘Snart ledig’,


foreach($ledighed as $k => $v) {
echo ‘<option value=”‘.$k.'”>’.$v.'</option>’;
<select id=”haller-select”>

‘Alle’ => ‘Alle’,
‘Hal A, stuen’ => ‘Hal A, stuen’,
‘Hal A, 1. sal’ => ‘Hal A, 1. sal’,
‘Hal B, stuen’ => ‘Hal B, stuen’,
‘Hal B, 1. sal’ => ‘Hal B, 1. sal’,
‘Hal C, stuen’ => ‘Hal C, stuen’,
‘Hal C, 1 .sal’ => ‘Hal C, 1 .sal’,
‘Garager’ => ‘Garager’,


foreach($haller as $t => $y) {
echo ‘<option value=”‘.$t.'”>’.$y.'</option>’;

and this is is the list kode:

<a href=”/haller/?location=<?php the_title() ;?>”><div id=”box” class=”boks-arkiv” data-sort1=”<?php the_field(‘ledig’); ?>” data-sort2=”<?php the_field(‘hal’); ?>” data-sort3=”<?php the_field(‘boks_storrelse’); ?>” >

<table class=”box-table”>
<th>Boks nummer</th><th>Boks Størrelse</th><th>Hal</th><th>Ledighed</th><th>Pris</th>
<td class=”box-number” ><?php the_title(); ?></td><td><?php the_field(‘boks_storrelse’); ?> m<sup>2</sup></td><td><?php the_field(‘hal’); ?></td><td id=”ledig”><?php the_field(‘ledig’); ?><p id=”date”><?php the_field(‘ledig_fra’); ?></p></td><td><?php the_field(‘pris’); ?> DKK</td>

Read more here:: ACF filter with select/options

Leave a Reply

Your email address will not be published. Required fields are marked *