Meta Box Lite
Meta Box

MB Text Limiter

Limit the number of characters or words entered for text and textarea fields.

Text Limiter is a free extension for the Meta Box plugin which allows you to limit the number of characters or words entered for text and textarea fields.

Using Text Limiter extension, you will have a similar input field like post content where the numbers of words entered and left are shown. It's very useful when you need to restrict the limit of the content entered by users to prevent unexpected result.

The numbers are updated in real-time. If users enter more than the specific words (or characters), the plugin automatically truncates the text to keep the length under the maximum value configured.

Install

You need to install Meta Box plugin first

  • Go to Plugins | Add New and search for Meta Box
  • Click Install Now button to install the plugin
  • After installing, click Activate Plugin to activate the plugin

Install Meta Box Text Limiter extension

  • Go to Plugins | Add New and search for Meta Box Text Limiter
  • Click Install Now button to install the plugin
  • After installing, click Activate Plugin to activate the plugin

Usage

Simply add 'limit' => 40 to text or textarea field parameters to limit by 40 characters.

If you need to limit by words, just add 'limit_type' => 'word'.

That's all! Note that this extension works only with text and textarea fields.

View plugin on wordpress.org | View plugin on Github

You might also like

meta box facetwp integration

MB FacetWP Integration

Integrates Meta Box and FacetWP, makes custom fields searchable and filterable in the frontend.
add custom fields to wordpress comments

MB Comment Meta

Add custom fields to comments in WordPress. Support all field types and options.
show custom fields in rest api

MB REST API

Pull all meta value from posts, terms into the WP REST API responses.
add custom fields to yoast seo content analysis

MB Yoast SEO Integration

Add content of custom fields to Yoast SEO Content Analysis to have better/correct SEO score.