WordPress Snippet
Last active
August 10, 2016 11:46
-
-
Save ControlledChaos/1a495155591d6165109776ad9333cea0 to your computer and use it in GitHub Desktop.
Limit the number of characters allowed in the post/page title field.
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
<?php function ccd_limit_title_chars() { ?> | |
<!-- Change maxLength number to desired limit --> | |
<script>jQuery( 'input#title' ).attr( 'maxlength', 36 );</script> | |
<?php } add_action( 'admin_footer', 'ccd_limit_title_chars' ); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment