[WordPress] 外掛分享: Links shortcode

首頁外掛目錄 › Links shortcode
WordPress 外掛 Links shortcode 的封面圖片
900+
安裝啟用
★★★★
4.5/5 分(12 則評價)
2319 天前
最後更新
問題解決
WordPress 3.8+ v1.8.3 上架:2010-11-16

內容簡介

此外掛可重新啟用 WordPress 的連結管理器,並提供 ‘links’ 短代碼。此短代碼會在您的文章中顯示具有指定特性的所有連結,例如連結類別名稱。預設會在每個連結中包含 Facebook Like 按鈕,但可以輕鬆禁用。

此外掛支援可自訂模板以顯示連結。這可讓您使用短代碼以任何您喜歡的格式顯示連結,例如列表或表格,或有或無連結圖像等。所有連結的相關屬性都受支援並列在此外掛的設定頁面上。

短代碼的典型格式為

[links option1=”x” option2=”y” etc…]

可用的選項如下:

fblike:顯示 Facebook Like 按鈕(預設為‘1’,要禁用設為除 ‘1’ 以外的任何值)。
fbrecommend:顯示 Facebook 建議按鈕(預設 ”,要啟用設為 ‘1’)。
orderby: 聯結排列方式(預設 ‘name’)。使用 ‘order’ 使用 ‘My Link Order’ 外插程式排序。
order: 排序方式,ASC或DESC(預設 ‘DESC’)。
limit: 顯示聯結的數量限制(預設為 ‘-1’,表示沒有限制)。
category: 以逗號分隔的連結分類 ID。
category_name:要顯示其連結類別的類別名稱。覆寫 category 參數。
hide_invisible:隱藏標記為不可見的連結(預設 ‘1’,是的)。
include:以逗號分隔的要包含的數字連結 ID 列表。如果使用了 ‘include’,將忽略 category、category_name 和 exclude 參數。
exclude:以逗號分隔的要排除的數字連結 ID 列表。
search:顯示符合此搜索字串的所有連結。它會在 URL、連結名和連結描述中進行搜索。
links_per_page:分頁連結清單。每頁顯示多少連結。分頁會顯示在連結下方。
links_list_id:來自目前所使用此短代碼唯一識別的 ID。在使用分頁的情況下必填,可選擇使用 CSS 為此 ID 定義自訂樣式。
class:可使用連結範本插入的類別。例如,您可以在範本中使用 <div class=”[class]”> 將不同的樣式附加到不同的短代碼實例中。
alttext:當短代碼沒有返回任何連結時顯示的替代文字。

可在設定選單中的 ‘Links Shortcode’ 頁面更改默認選項。

例如:

[links category_name=”Blogroll”]

使用可自訂範本,可以顯示連結的所有屬性。範例範本已包含。此範本會使用連結的名稱、網址、說明和評分。名稱會連結至網址。

如果名稱以日期開頭,格式為:yyyy-mm-dd 接 ‘:’,則可用於分開的日期屬性。

範本是完全可自訂的。詳細資訊請參閱 http://www.apprique.com/community/wordpress-plugins。

請注意,連結的描述文字長度是有限制的,但 WordPress UI 不會顯示這一點。在存儲連結部分的更改之後,WordPress 只會保存前 255 個字符。這與此外掛無關。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.8.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Links shortcode」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

The plugin re-enables the Link Manager in WordPress and provides the shortcode ‘links’. This shortcode displays a list of all links having specified characteristics, for example a link category name in your post. By default it includes a Facebook Like button for every link, but this can be easily disabled.
The plugin supports a customizable template for showing links. This enables you to use the shortcode to display links in any format you like, for example in a list or a table, with or without link images, etc. All relevant properties of a link are supported and listed on the Settings page of the plugin.
The typical format for the short code is

[links option1=”x” option2=”y” etc…]

The following options are available:

fblike: Show the facebook Like button (default ‘1’, to disable set to any value other than ‘1’).
fbrecommend: Show the Facebook Recommend botton (default ”, to enable set to ‘1’).
orderby: Order the links by (default ‘name’). Use ‘order’ to order links by order specified with ‘My Link Order’ plugin.
order: How to order, ASC or DESC (default ‘DESC’).
limit: Limit the number of links shown (default ‘-1’, which means no limit).
category: Comma separated list of link category ID’s.
category_name: Category name of a catgeory of links to show. Overrides category parameter.
hide_invisible: Hide links marked as not visible (default ‘1’, yes).
include: Comma separated list of numeric link IDs to include. If ‘include’ is used, the category, category_name, and exclude parameters are ignored.
exclude: Comma separated list of numeric link IDs to exclude.
search: Shows all links matching this search string. It searches url, link name and link description.
links_per_page: To paginate lists of links. How many links to show per page. Below the links a pagination will be shown.
links_list_id: A unique identifyer on a page for the shortcode at hand. Mandatory in case ‘links_per_page’ is used to paginate. Optional to define custom styles for this id using css.
class: A class that can be inserted using the links template. You could for example use

in the template to attache different style to different instances of the short code.
alttext: An alternative text that will be displayed if the shortcode does not return any links.

Dafault options can be changed on a ‘Links Shortcode’ page in the Settings menu.
Example:

[links category_name=”Blogroll”]

Using the customizable template, all properties of a link can be displayed. An example template is included. This template uses the Name, Web Address, Description and Rating of your links. The Name will link to the Web Address.
If the Name starts with a date, formatted as: yyyy-mm-dd followed by ‘:’, a separate property for the date is available.
Templates are fully customizable. For more information see http://www.apprique.com/community/wordpress-plugins.
Please note that the Description of a link has a limited length, but the WordPress UI does not show this. After saving changes to a Link in the Links section, WordPress only saves the first 255 characters. This has nothing to do with this Plugin.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon