[wp-trac] [WordPress Trac] #64991: New param "allow_multiple_terms" in `register_taxonomy` for single term restriction
WordPress Trac
noreply at wordpress.org
Mon Mar 30 10:13:26 UTC 2026
#64991: New param "allow_multiple_terms" in `register_taxonomy` for single term
restriction
-----------------------------+-----------------------------
Reporter: bastho | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version:
Severity: normal | Keywords:
Focuses: ui |
-----------------------------+-----------------------------
The `register_taxonomy` function is based on the two main taxonomies:
categories and tags.
Custom taxonomies can only have those two behaviors: hierarchical terms,
like categories or non hierarchical terms like tags.
At this time, when a plugin adds a custom taxonomy, the generated UI is:
- checkboxes for category like taxonomies
- multiple select for tag like taxonomies
If a plugin needs to exclusive terms, the UI has to be hidden and a custom
box added which causes UI inconsistency between plugins.
It would be very useful to natively allow single term behavior, just like
post-format does.
In this case, the UI could be a simple **select** or **radio buttons**
(preference for select).
I suggest a `allow_multiple_terms` parameter, with default value **true**
Setting it to **false** would make use the simple `<select>` field.
Caveats:
Need to manage: single edit page, quick-edit and bulk-edit.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64991>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list