[WordPress] 外掛分享: Shortcoder — Create Shortcodes for Anything

WordPress 外掛 Shortcoder — Create Shortcodes for Anything 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Shortcoder — Create Shortcodes for Anything」是 2010-05-07 上架。
  • 目前有 100000 個安裝啟用數。
  • 上一次更新是 2025-04-06,距離現在已有 27 天。
  • 外掛最低要求 WordPress 4.9.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.3 以上。
  • 有 222 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

vaakash |

外掛標籤

code | html | snippets | shortcode | javascript |

內容簡介

Shortcoder 外掛可讓您建立 HTML、JavaScript、CSS 和其他代碼片段的自訂捷徑。現在,這些捷徑可以在文章/頁面中使用,並且該片段將取代其位置。

✍ 輕鬆建立捷徑

為捷徑命名
將 HTML/JavaScript/CSS 貼入捷徑內容中
儲存!
現在在文章/頁面中插入捷徑 [sc name="my_shortcode"]。
完成!您現在在文章中有了 HTML/Javascript/CSS。

✨ 功能

輕鬆建立自訂捷徑,並在支援捷徑的任何地方使用它們。
可使用任何 HTML、JavaScript、CSS 作為捷徑內容。
插入:捷徑內的自訂參數
插入:WordPress 參數在捷徑中
多種編輯器:代碼、視覺和文本模式。
不需要時全域停用捷徑。
在桌面、移動設備上停用捷徑。
文章編輯器中有選取插入捷徑的按鈕。
支援 Gutenberg。

🎲 使用範例

在 Shortcoder 管理員頁面中建立名為 "adsenseAd" 的捷徑。
將 AdSense 代碼貼到提供的框中並儲存。
於文章和頁面中使用 [sc name="adsenseAd"]。
完成!廣告代碼已取代並顯示在文章中。
現在,您可以在一個地方編輯廣告代碼,所在地方的捷徑將更新其代碼。

同樣地,捷徑也可用於經常使用的片段。

您也可以在片段中添加自訂參數(如%%id%%),如 [sc name="youtube" id="GrlRADfvjII"] 使用時更改其值。

🧱於區塊編輯器中使用

儘管手動可以在任何地方使用捷徑,Shortcoder 還提供以下選項,使工作與區塊編輯器更容易選擇並插入建立的捷徑。

Shortcoder 區塊
選取並插入捷徑的工具列按鈕(在 "更多" 下)

💎 升級至 PRO 版本

Shortcoder 也提供PRO 版本,擁有其他功能以進一步提升體驗。以下功能是 PRO 版本提供的功能。

自訂編輯器-使用區塊編輯器或頁面生成器插件(如 Elementor 和 WPBakery)編輯捷徑內容。
版本-為捷徑內容提供版本支援。
定位捷徑-在使用捷徑的文章和頁面中搜尋。
額外代碼-在頁面中使用捷徑時,將額外的代碼包含在頁腳中。

開始使用 Shortcoder-PRO

連結

文件
常見問題
支援論壇/回報錯誤
PRO 功能

原文外掛簡介

Shortcoder plugin allows to create a custom shortcodes for HTML, JavaScript, CSS and other code snippets. Now the shortcodes can be used in posts/pages and the snippet will be replaced in place.
✍ Create shortcodes easily

Give a name for the shortcode
Paste the HTML/JavaScript/CSS as shortcode content
Save !
Now insert the shortcode [sc name="my_shortcode"] in your post/page.
Voila ! You got the HTML/Javascript/CSS in your post.

✨ Features

Create custom shortcodes easily and use them in any place where shortcode is supported.
Have any HTML, Javascript, CSS as Shortcode content.
Insert: Custom parameters in shortcode
Insert: WordPress parameters in shortcode
Multiple editors: Code, Visual and text modes.
Globally disable the shortcode when not needed.
Disable shortcode on desktop, mobile devices.
A button in post editor to pick the shortcodes to insert.
Execute blocks HTML in shortcode content.
Insert shortcodes in Gutenberg/block editor.

🎲 An example usage

Create a shortcode named “adsenseAd” in the Shortcoder admin page.
Paste the adsense code in the box given and save it.
Use [sc name="adsenseAd"] in your posts and pages.
Tada !!! the ad code is replaced and it appears in the post.
Now you can edit the ad code at one place and the code is updated in all the locations where the shortcode is used.

Similarly shortcodes can be created for frequently used snippets.
You can also add custom parameters (like %%id%%) inside the snippets, and change it’s value like [sc name="youtube" id="GrlRADfvjII"] when using them.
🧱 Using in block editor
Though shortcodes can be used in any place manually, Shortcoder provides below options to select and insert the shortcodes created easily when working with the block editor.

Shortcoder block
Toolbar button to select and insert shortcodes inline (under “more”)

💎 Upgrade to PRO
Shortcoder also provides a PRO version which has additional features to further enhance the experience. Below features are offered in the PRO version.

Custom editor – Edit Shortcode content using block editor or page builder plugins like Elementor and WPBakery.
(New) Translation with WPML – Translate Shortcode content with WPML.
Revisions – Revisions support for Shortcode content.
Locate shortcode – Search posts and pages where a shortcode is used.
Extra code – Include extra code to the footer when a shortcode is used in a page.

Get started with Shortcoder – PRO
Links

Documentation
FAQs
Support forum/Report bugs
PRO features

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Shortcoder — Create Shortcodes for Anything」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 4.0 | 4.1 | 4.2 | 4.3 | 4.4 | 4.5 | 4.6 | 5.0 | 5.1 | 5.2 | 5.3 | 5.4 | 5.5 | 5.6 | 5.7 | 5.8 | 6.0 | 6.1 | 6.2 | 6.3 | 6.4 | 6.5 | 3.0.1 | 3.4.1 | 4.0.1 | 4.0.2 | 4.0.3 | 4.1.1 | 4.1.2 | 4.1.3 | 4.1.4 | 4.1.5 | 4.1.6 | 4.1.7 | 4.1.8 | 4.1.9 | 5.0.1 | 5.0.2 | 5.0.3 | 5.0.4 | 5.2.1 | 5.3.1 | 5.3.2 | 5.3.3 | 5.3.4 | 6.3.1 | 6.3.2 | trunk |

延伸相關外掛(你可能也想知道)

  • WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager 》插入標頭和頁腳 + 完整的 WordPress 代碼片段外掛, WPCode (前稱为 WPBeginner 的 "插入標頭和頁腳")是使用率超过 100 万个网站的 WordPress 代码片段外掛中...。
  • Code Snippets 》Code Snippets 是在您的網站上運行程式碼片段的簡單,清潔和簡單的方法。它消除了將自定義片段添加到您的佈景主題的 functions.php 檔案的需求。, 現在提供 C...。
  • Simple Custom CSS Plugin 》無需麻煩地將自訂 CSS 新增到 WordPress 網站中。, 這是一個易於使用的 WordPress 外掛,可以添加自訂 CSS 樣式以覆寫外掛和佈景主題的預設樣式。該外掛旨在...。
  • Head & Footer Code 》Head & Footer Code 插件可以讓你在不是開發人員的情況下,添加自定義代碼片段(JavaScript、CSS 或 HTML)到網頁中。您可以將代碼放置在 (...。
  • Scripts n Styles 》這個外掛讓管理員用戶能夠將自訂的 CSS 和 JavaScript 直接添加到個別文章、頁面或任何註冊的自訂文章類型中,也可以將類別添加到 body 標籤和文章容器中。還...。
  • SyntaxHighlighter Evolved 》現在支援 WordPress 5.0 中的新區塊編輯器!, SyntaxHighlighter Evolved 讓您可以輕鬆地在網站上張貼帶有語法加亮功能的程式碼,而不會失去格式或做任何手動...。
  • Code Embed 》注意: WordPress 5.0 及以上版本的使用者請查看常見問題以了解如何在區塊編輯器中使用此外掛。, Code Embed 外掛允許您在文章中嵌入程式碼(JavaScript 和 H...。
  • PHP Everywhere 》注意:此外掛更新至 3.0.0 版本是一項重大變更,將移除 [php_everywhere] 短代碼和小工具。請透過外掛設定頁面中的升級嚮導,將原本的代碼轉換為 Gutenberg ...。
  • Highlighting Code Block 》「Highlighting Code Block」外掛可讓你以一個點擊的方式添加一個有語法突顯的程式碼區塊。, 它支援「區塊編輯器」和「傳統編輯器」。, (不過,我們建議在「...。
  • CSS & JavaScript Toolbox 》感謝您查看我們的程式碼片段外掛。我相信它將完全符合您的需求。, 適用於以下情況:, , 前端修改(無需修改主題文件), 添加功能(無需修改functions.php), ...。
  • Advance Custom HTML 》這是一款用來專業編寫 HTML 代碼的高級 HTML 編輯器,提供不同的樣式、縮排與更多功能。, Advance Custom HTML 是一款功能強大、彈性十足的區塊外掛,讓您可...。
  • Code Block Pro – Beautiful Syntax Highlighting 》展示你美麗的程式碼,不僅僅是顯示它!這個版塊外掛提供編輯程式碼塊的功能,直接運行你的程式碼,使用與受歡迎的 VS Code 編輯器相同的渲染引擎。此外掛提供...。
  • Code Syntax Block 》代碼語法區塊(Code Syntax Block)擴充了 WordPress 區塊編輯器,使用 Prism 語法高亮工具為核心代碼區塊添加了語法高亮支持。, Prism 語法高亮工具在前端執...。
  • Foxtool All-in-One: Contact chat button, Custom login, Media optimize images 》總結:Foxtool 是根據管理 WordPress 網站的真實需求而開發的產品。經過一段時間的發展,Foxtool 已成為網站管理員不可或缺的外掛程式。該外掛擁有許多值得注...。
  • Advanced CSS Editor 》Advanced CSS Editor 是一個輕量級的外掛,它讓你可以在即時編輯器中為不同設備(桌面、平板、手機)撰寫不同的 CSS 代碼,並且可以即時查看結果。, 因此,只...。

文章
Filter
Apply Filters
Mastodon