About this plugin
Truncate Text lets you shorten long strings of text in posts, pages, or custom content. Ideal for trimming usernames, crypto wallet addresses, or any lengthy content, it offers flexible options to control exactly how and where the text is truncated.
Check out our other awesome plugins: Admin Hero | Admin Shift
Usage
- Use the [truncate-text] shortcode to truncate text in your post or page content.
- Use the [truncate-shortcode] shortcode to process nested shortcodes before truncating.
Optional Attributes
These attributes work with both shortcodes:
– limit: Set the number of characters to display (default: 6).
1622CC44
– encoding: Specify the text encoding (default: UTF-8).
Example: [truncate-text encoding="ISO-8859-1"]text[/truncate-text]
– location: Choose where to truncate: “start”, “middle” (default), or “end”.
Examples:
1622CC44
22CC44
– [truncate-text location="end"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text] → 0x8755...
– dots: Set the number of dots in the ellipsis (default: 3).
Examples:
– [truncate-text location="end" dots="10"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text] → 0x8755..........
22CC44
Nested Shortcode Example
- [truncate-shortcode limit="6" location="end" dots="4"][another-shortcode][/truncate-shortcode]
Processes the inner shortcode first, then truncates the result.
Support
com. We’re happy to assist!
Contributing
We welcome contributions! com.