For a custom taxonomy I have created. For each new item, the description field is showing. I would like to hide the description textarea ( Since you can see from the image that I am using an advanced custom field for the description ).
I know there is a way to do it. Can anyone let me know how I can hide the field?
My approach
I did find an answer on SO something like this:
add_action( 'admin_footer-edit-tags.php', 'wpse_56569_remove_cat_tag_description' );
function wpse_56569_remove_cat_tag_description(){
global $current_screen;
switch ( $current_screen->id )
{
case 'edit-category':
// WE ARE AT /wp-admin/edit-tags.php?taxonomy=category
// OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=1&post_type=post
break;
case 'edit-post_tag':
// WE ARE AT /wp-admin/edit-tags.php?taxonomy=post_tag
// OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=post_tag&tag_ID=3&post_type=post
break;
}
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('#tag-description').parent().remove();
});
</script>
<?php
}
But did not work.