Support » Fixing WordPress » Tag Spam

  • Our website does not allow comments on any posts.
    However it came to our attention that despite the comment function being turned off in the global WP settings, the “tag” function is still active and allows for bot injection of spam tags to be added.
    While they are not added to any post, it just clutters up the database with junk. It’s possible to unset the tag function for posts in the theme functions.php page, to prevent further activity, but it might be a good idea to add a step to turn off tags as well if the comment function is set to inactive in upcoming versions.


Viewing 1 replies (of 1 total)
  • Hello,

    Paste this code into your functions.php

    add_action( 'admin_menu', 'myprefix_remove_meta_box');
    function myprefix_remove_meta_box(){
       remove_meta_box( 'tagsdiv-post_tag','post','normal' );

    tags meta box has a class of tagsdiv-post_tag, so this will remove the tags meta box


    add_action('init', 'remove_tags');
    function remove_tags(){
        register_taxonomy('post_tag', array());

    Hope this helps.


Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.