Support

Account

Home Forums Backend Issues (wp-admin) Taxonomy not saving on Attachment Reply To: Taxonomy not saving on Attachment

  • I realise I am necroposting, but I found this answer useful and wanted to post a small improvement.

    The first function remove_custom_taxonomy can be eliminated if meta_box_cb is set to false when making the initial register_taxonomy call.

    Or, if you don’t have control of the registration, you can filter the args later:

    
    function removeTaxonomyInEditor($args, $taxonomy)
    {
         if ($taxonomy === 'INSERTYOURTAXONOMYNAME') {
            $args['meta_box_cb'] = false;
        }
        return $args;
    }
    add_filter('register_taxonomy_args', removeTaxonomyInEditor, 10, 2);