Custom Post Type Taxonomy Select dropdown list

I think you can achieve this by using JavaScript. You’ll need to add an event listener that triggers a redirect to the selected URL when the dropdown’s value is changed.

Here’s one possible way of doing it. It’s the quickest way I can think of, and I haven’t tested it yet, but you get the idea. You can further improve on this by using jQuery if you want to.

<label for="films">Films</label>
<select name="films" id="films" onchange="document.location.href=this.options[this.selectedIndex].value;">
    <option value="" disabled selected>Films</option>
    <?php
        $taxonomy = 'films';
        $terms = get_terms($taxonomy); // Get all terms of a taxonomy

        if ( $terms && !is_wp_error( $terms ) ) : ?>
            <?php foreach ( $terms as $term ) { ?>
                <option value="<?php echo get_term_link($term->slug, $taxonomy); ?>"><?php echo $term->name; ?></option>
            <?php } ?>
        <?php endif;?>
</select>

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino