[WordPress] 外掛分享: Sidebar Shortcode

WordPress 外掛 Sidebar Shortcode 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Sidebar Shortcode」是 2018-03-03 上架。
  • 目前有 1000 個安裝啟用數。
  • 上一次更新是 2021-12-08,距離現在已有 1243 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.4 以上版本才可以安裝。
  • 有 3 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

thinkerwebdesign |

外掛標籤

sidebar | shortcode | widget area | sidebar shortcode | widget area shortcode |

內容簡介

功能:

使用短碼(shortcode)並使用側邊欄名稱或 ID,將側邊欄新增至 WordPress 文章和頁面。
新增一個或多個自訂類別以符合您的佈景主題風格或自訂 CSS 風格(選用)。

如何使用:

方法 1 -(建議使用:使用側邊欄名稱添加側邊欄)

側邊欄名稱可在 WordPress 管理員區域的 外觀 > 小工具 部分中找到。

範例:

[sidebar name="your-sidebar-name"]
[sidebar name="your-sidebar-name" class="custom-class"]
[sidebar name="your-sidebar-name" class="custom-class-1 custom-class-2 custom-class-3"]

方法 2 -(高級 WP 使用者:使用側邊欄 ID 添加側邊欄)

側邊欄 ID 可在您的主題的 register_sidebar 函数中找到,通常位於主題的 functions.php 文件中。

範例:

[sidebar id="your-sidebar-id"]
[sidebar id="your-sidebar-id" class="custom-class"]
[sidebar id="your-sidebar-id" class="custom-class-1 custom-class-2 custom-class-3"]

一般注意事項:

短碼(shortcode)名稱或 ID 的拼字和大小寫必須與所需的側邊欄完全匹配。
活躍側邊欄的定義:包含小工具的側邊欄。
不帶有活動側邊欄名稱或 ID 的 [sidebar] 短碼將不顯示任何內容。
如果同一個短碼中同時存在活動的側邊欄名稱和 ID,則活動側邊欄 ID 將優先於側邊欄名稱。
可在同一頁面或文章中使用多個短碼(shortcode)。
同一個側邊欄短碼(shortcode)可以多次使用在同一頁面或文章上。

HTML 類別注意事項:

使用空格字符分隔多個自定義類別。參見上面的「方法」章節中的範例。
可使用的自定義類別數量沒有限制。
每個自訂類別必須僅包含(字母,數字,-,_)字符,否則所有自訂類別都會被省略。
如果側邊欄 ID 只包含(字母,數字,-,_)字符,則永遠會將其添加到 HTML 類別屬性中。

演示:

訪問外掛 URI

原文外掛簡介

Features:

Add sidebars to WP Posts and Pages with shortcodes using a sidebar Name or sidebar ID.
Add one or more optional custom classes to match your theme styles or custom CSS styles.

How to Use:
Method 1 – (Recommended Use: Add a sidebar using a sidebar Name.)
A sidebar Name can be found in the Appearance > Widgets section of your WordPress Admin Area.
Example uses:

[sidebar name="your-sidebar-name"]
[sidebar name="your-sidebar-name" class="custom-class"]
[sidebar name="your-sidebar-name" class="custom-class-1 custom-class-2 custom-class-3"]

Method 2 – (Advanced WP Users: Add a sidebar using a sidebar ID.)
A sidebar ID can be found in your theme’s register_sidebar functions, usually in the theme’s functions.php file.
Example uses:

[sidebar id="your-sidebar-id"]
[sidebar id="your-sidebar-id" class="custom-class"]
[sidebar id="your-sidebar-id" class="custom-class-1 custom-class-2 custom-class-3"]

General Notes

The spelling and capitalization of a shortcode Name or ID must exactly match that of the desired sidebar.
Definition of an active sidebar: An active sidebar is a sidebar that contains widgets.
A [sidebar] shortcode without an active sidebar Name or active sidebar ID displays nothing.
An active sidebar ID overrides a sidebar Name if both are present in the same shortcode.
There is no limit to the number of shortcodes that can be used on the same page or post.
The same sidebar shortcode can be used multiple times on the same page or post.

HTML Class Notes

Separate multiple custom classes using a space character. Examples shown in Method sections above.
There is no limit to the number of custom classes that can be used.
Each custom class must only contain (letter,number,-,_) characters, otherwise all custom classes are omitted.
The sidebar ID is always added to the HTML class attribute if it contains only (letter,number,-,_) characters.

Demo:
Visit Plugin URI

各版本下載點

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

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


1.0.0 |

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

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon