Meta Box Text Limiter

Edit this page on Github

Overview

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

Installation

Before installing the extension, you need to install Meta Box plugin first.

  1. Go to Plugins → Add New and search for Meta Box
  2. Click Install Now button to install the plugin
  3. After installing, click Activate Plugin to activate the plugin

The extension is just a WordPress plugin, you can install it like a normal WordPress plugin.

  1. Go to Plugins, click Add new, then click Upload plugin.
  2. Choose the .zip file you downloaded and click Install now
  3. After finishing upload, click Activate to finish.

Usage

Assume you have a text field with the following settings:

[
	'title' => 'My Text Field',
	'id'    => 't',
	'type'  => 'text',
],

And you want to limit the number of characters for that field to 40. Doing that by adding 'limit' => 40 to the field:

[
	'title' => 'My Text Field',
	'id'    => 't',
	'type'  => 'text',
	'limit' => 40,
],

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

[
	'title'      => 'My Text Field',
	'id'         => 't',
	'type'       => 'text',
	'limit'      => 40,
	'limit type' => 'word',
],

That’s all!

Note that this extension works only with text and textarea fields.

Edit this page on Github