Is it possible to disable certain user roles from creating tags?

As a site admin, I’d like to have control over things.

I’d like to prevent my contributors and authors ( who generate content for me ) from creating new tags. I don’t want that tag taxonomy to turn into a zoo! Especially when you know that wordpress creates separate terms for apple and Apple! I give them a while list ( of 1000 tags that I want them to cover ) and that’s it. They cannot come up with the 1001st.

Read More

How do I achieve that so that my authors just pick from what I give them?

Related posts

Leave a Reply

3 comments

  1. This is the most solid answer to this, if anyone ever comes to this post again.

    This this in your functions.php file.

    add_action( 'pre_insert_term', function ( $term, $taxonomy )
    {
        return ( 'yourtax' === $taxonomy )
            ? new WP_Error( 'term_addition_blocked', __( 'You are unauthorized to add new terms.' ) )
            : $term;
    }, 0, 2 );
    

    I hope this helps anyone in the future.