Taxonomy Selectors
Creates a selector based on the given taxonomy using shortcode [ind-tax-selector tax='$taxonomy_slug']
by Michael Dion · github.com/tonalqualityx/taxonomy-selectors · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/tonalqualityx/taxonomy-selectors/archive/refs/heads/master.zipThis plugin is a simple plugin for building a quick, dynamic, nested select input element based on the terms in a given taxonomy. Here's how it works:
Shortcode
[ind-taxonomy-selector]
Arguments
You may add arguments/attributes to the shortcode as follows:
- tax (Default is 'category') - use the slug of the taxonomy.
- id (Default is an empty string) - enter the id you'd like used on the select element.
- name (Default is an empty string) - enter the name you'd like used on the select element.
- classes (Default is an empty string) - enter the classes you'd like used on the select element (you can just separate them with a space like you normally would)
- _hideempty (Default is 'false') - If you'd like to hide the empty taxonomy terms (the ones that don't have any posts yet) set this to true.
Usage
Use the shortcode like this:
[ind-taxonomy-selector tax='my-custom-taxonomy' id='custom-select-element-id' name='my-custom-name' classes='big-select-box another-class' hide_empty='false']
Produces
<select name="my-custom-name" id="custom-select-element-id" class="big-select-box another-class">
<option class="level-0" value="antiques">Antiques</option>
<option class="level-1" value="apartment-rentals">Apartment Rentals</option>
<option class="level-2" value="apartment-wanted">Apartment Wanted</option>
<option class="level-3" value="estate-sale">Estate Sale</option>
<option class="level-1" value="auto-sale">Auto Sale</option>
<option class="level-0" value="auction">Auction</option>
<option class="level-0" value="barn-sale">Barn Sale</option>
<option class="level-0" value="commercial-rentals">Commercial Rentals</option>
</select>