Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="class-drop">
- <select name="batch_sel" >
- <option value="all" <?php if($_GET['batch_sel'] == 'all'){echo 'selected'; } ?> >All </option>
- <?php
- $terms = get_terms( array(
- 'taxonomy' => 'result-year',
- 'hide_empty' => false, ) );
- $batch_slugs = wp_list_pluck( $terms, 'slug' );
- foreach($terms as $term):
- ?>
- <option value="<?= $term->slug ?>" <?php if($term->slug == $_GET['batch_sel']) { echo 'selected';} ?>> <?= $term->name ?> </option>
- <?php endforeach ?>
- </select>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement