Skip to content

Instantly share code, notes, and snippets.

@ControlledChaos ControlledChaos/README.md
Last active Aug 10, 2016

Embed
What would you like to do?
Limit the number of characters allowed in the post/page title field.

Limit Title Characters

WordPress Snippet

<?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
You can’t perform that action at this time.