Last active
July 8, 2020 00:43
-
-
Save devwax/569c3b13e6b620b0d5b897e9dd2051ab to your computer and use it in GitHub Desktop.
Truncate taxonomy description in WP Admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Truncate taxonomy description in WP Admin | |
function wpse_term_description_attributes() { ?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
$( '.description.column-description' ).attr( 'style', 'white-space: nowrap; text-overflow:ellipsis; overflow: hidden; max-width:1px;' ); | |
}); | |
</script><?php | |
} | |
add_action( 'admin_head', 'wpse_term_description_attributes' ); | |
// Reference: https://stackoverflow.com/questions/5239758/css-truncate-table-cells-but-fit-as-much-as-possible |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment