views:

23

answers:

1

In the post screen, I want to remove the option of multi-authors being able to 'free tag' their posts. In other words, only allow tags that have been preset in the admin tags section.(these tags are of course visible in the tag cloud in posts screen) The concept is to prevent authors introducing random tags in their posts, leading to duplication and confusion.

A: 

Add the following code to the function.php file in the WordPress theme you are using. Take note of the closing and opening PHP tags.

function disable_tags()
{
    ?>
    <script type='text/javascript'> 
        jQuery(document).ready(function() {
            jQuery('#new-tag-post_tag').attr("disabled", "disabled").css("display", "none");
            jQuery('.tagadd').attr("disabled", "disabled").css("display", "none");
            jQuery('#post_tag').css("display", "none");
        });
    </script>
    <?php
}
add_action('admin_head', 'disable_tags');

This will disable and hide the field and Add New Tag button making the only tagging option the pre-defined tags in the admin section.

hsatterwhite
Great hack hsatterwhite, thank-you for the reply. I'll try thyis today!
Richard
I tried this today and it works exactly right. Hides the tag entry form in the write post screen. Simple and effective. Very greatful!
Richard
Glad I could help!
hsatterwhite