WordPress plugin intelligence profile

Limit taxonomy term count

Allows passing a "limit" attribute to the register_taxonomy() function. This makes it possible to limit the number of taxonomy terms users a …

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.9
Current version1.0
WordPress coverageTested up to WordPress 4.9
Minimum stackWP 4.7 · PHP 5.6
Directory statusactive
Last directory update23 Oct 20188y ago
Active installationsNewAdoption metric — not a quality score
WordPress.org rating5.0 / 5 from 1 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Limit taxonomy term count version 1.0 as active, updated 8y ago and tested up to WordPress 4.9.

Overview

About this plugin

By default WordPress does not allow you to limit how many taxonomy terms can be attached to a post.

Enabling this plugin allows the use of the “limit” attribute when initially calling register_taxonomy().

If the limit is set to 1 then only one term can be added to the post. If the limit is greater than one then that many

terms may be added to the post. If the limit is attribute is not set, or it’s set to -1 this plugin has no effect.

Example code showing the use of the limit attribute:

register_taxonomy('artists', 'art_work', [ 'label' => 'Artists', 'show_ui' => true, 'limit' => 1, ]);

This example shows the use of a custom taxonomy called “artists” and the post type is “art_work”.

Here is another example but this time it’s editing the previously registered taxonomy “post_tag”:

// First load the taxonomy $taxonomy = get_taxonomy('post_tag');

// Edit it to only allow 2 tags to be added per post $taxonomy->limit = 2;

// Re-save it with our updated settings (note casting the object to an array before saving) register_taxonomy('post_tag', 'post', (array)$taxonomy);

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • taxonomy term
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.9

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.9.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.9
Minimum requirementsWordPress 4.7 · PHP 5.6
Update activity23 Oct 20188y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.