add_action( 'admin_head-edit-tags.php', 'wpse152619_edit_tags_trim_description' ); function wpse152619_edit_tags_trim_description() { add_filter( 'get_terms', 'wpse152619_trim_description_callback', 100, 2 ); } function wpse152619_trim_description_callback( $terms, $taxonomies ) { if( 'product_cat' == $taxonomies[0] ) { foreach( $terms as $key => $term ) { $terms[$key]->description = wp_trim_words( $term->description, 12, ' [...]' ); } } return $terms; }
If you just want to truncate the description, in those cases when it’s long but you still want to see it in the admin table, use this:
/** * Remove default description column from category */ function jw_remove_taxonomy_description($columns) { // only edit the columns on the current taxonomy, replace category with your custom taxonomy (don't forget to change in the filter as well) if (!isset($_GET['taxonomy']) || $_GET['taxonomy'] != 'category') { return $columns; } // unset the description columns if ($posts = $columns['description']) { unset($columns['description']); } return $columns; } add_filter('manage_edit-category_columns', 'jw_remove_taxonomy_description');