Addon plugin for Advanced Custom Fields to select a term or an entire taxonomy from a list of multiple allowed taxonomies.
Advanced Custom Fields comes with a basic taxonomy field, but this limits you to only showing the terms from one taxonomy at a time. What if you want to show the terms from multiple taxonomies, or select the taxonomy itself?
ACF Term and Taxonomy Chooser adds a custom field type to ACF that lets you set whether you want to show a "Term" or "Taxonomy", a multiselect option of which Taxonomies to choose from, and whether you want to return the ID or the Slug (Terms only, Taxonomies just return slug)
When using the field in the editor, it will be a drop menu that lets you select a single term or a single taxonomy.
Compatible with Advanced Custom Fields v5/Pro
-
Why would I want to use a taxonomy instead of a term? Lots of reasons! Though there's no such thing as a "taxonomy archive", you might want to display all terms in a selected taxonomy as a list of links, for example.
-
Why can't I select multiple terms? That's not how this is built. There is a multi-select taxonomy term ACF plugin out there already that you can use to select multiple terms from multiple taxonomies, or use ACF's built in Taxonomy field to select multiple terms from a single taxonomy.
- Copy the
acf-taxonomy-chooser
folder into yourwp-content/plugins
folder - Activate the ACF Term and Taxonomy Chooser plugin on the Plugins admin page
- When creating a new field in ACF, select Term and Taxonomy Chooser
- The short array syntax (
[]
rather thanarray()
) requires PHP 5.4+ - Advanced Custom Fields version 5 is required.