How to Prevent WordPress Users from Creating New Tags
We had an interesting question from a PublishPress user this week:
I am trying to allow a some user role to choose an existing Tag, but not allow them to create new Tags. This was simple enough to do with Categories, but I cannot figure it out for Tags.
This was a great question that requires some explanation. We recommend the TaxoPress plugin for managing your tags, but PublishPress plugins can handle these more complex permissions.
This situations happens because Tags are designed for on-the-fly creation by regular authors. In contrast, Categories are designed to be created by higher-level users.
This image below shows what a user in the Author role will see:
- They can choose existing Categories, but they do not see the normal “Add New Category” link.
- They can create new Tags.
Fortunately, a workaround is possible with the PublishPress Permissions plugin. The next part of this guide will show you how …
How to block Authors from creating new Tags
In this guide, I'll use the example of the Authors role, but you could use this same approach to block any user role.
- Install the PublishPress Permissions plugin.
- Go to Permissions > Settings in your WordPress admin menu.
- Click the “Core” tab.
- Scroll down to “Filtered Taxonomies”.
- Make sure the box is checked for “Tags”.
- Click “Save Changes”.
- Go to Permissions > Groups in your WordPress admin menu.
- Click “Edit” for “WP Author”.
- Click the “Set Specific Permissions” tab.
- Post type: Post
- Operation: Assign Term
- Adjustment: Limit to
- Qualification: Tags
- Select Tags: Choose all the tags that Authors can choose.
- Click “Add Selected”.
- Click “Save Permissions”.
Now when an Author creates a post, they will be able to choose existing Tags. They can also attempt to create new tags, such as “Tag F” in the image below.
However, when they save the posts, any new Tags will not be saved:
Block users from adding one specific Category or Tag
In addition to preventing users from adding ANY new tags or categories, you can automatically create tags for authors.
You can also block them from adding specific Tags and Categories items. This video below explains more:
With a little code you can also use author data to automatically create WordPress tags or automatically create WordPress Tags for user roles.
Join PublishPress today
Join PublishPress today and you'll get powerful publishing and permissions plugins to improve your WordPress site.