前言介紹
- 這款 WordPress 外掛「Truncate Text」是 2023-03-01 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2025-04-26,距離現在已有 10 天。
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.2 以上。
- 有 2 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
nchisley |
外掛標籤
shortcodes | shorten text | truncate text | text truncation | Content Formatting |
內容簡介
Truncate Text 是一個簡單的 WordPress 外掛,可以讓您截斷文章和頁面中的文本。此外掛可用於創建內容的簡短版本,如用戶名、加密錢包地址等。
使用方法
- 在文章或頁面內容中使用 [truncate-text] 短碼來截斷文本。
- 使用 limit 屬性來指定您要顯示的字符數。例如:[truncate-text limit=”8″] 要截斷的文本 [/truncate-text]。預設為 6。
- 使用 encoding 屬性指定您要使用的編碼方式。例如:[truncate-text limit=”8″ encoding=”ISO-8859-1″]。預設為 UTF-8。
- 在截斷文本之前,此外掛也會處理內容中的其他短碼。要使用截斷短碼功能,請使用 [truncate-shortcode] [another-shortcode] [/truncate-shortcode]。
- 在截斷短碼時使用相同的屬性。
支援
如果您對此外掛有任何問題或疑慮,請透過我們的支援通道聯繫我們。我們很樂意為您提供幫助!
貢獻
我們歡迎對此外掛進行貢獻。如果您想要貢獻,請遵循我們的貢獻指南。
原文外掛簡介
Truncate Text is a simple WordPress plugin that allows you to truncate text in your posts and pages. Perfect for shortening usernames, cryptocurrency wallet addresses, or any lengthy content, this plugin provides flexible options to control how text is truncated.
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).
Example: [truncate-text limit="8"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text] → 0x8755B1...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:
– [truncate-text location="start"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text] → ...1622CC44
– [truncate-text location="middle"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text] → 0x8755...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..........
– [truncate-text location="middle" dots="5"]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
If you have questions or issues, please reach out through our support channel at NateChisley.com. We’re happy to assist!
Contributing
We welcome contributions! Please follow our guidelines for contributing at NateChisley.com.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Truncate Text」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.0.2 | 1.0.3 | trunk |
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。