[WordPress] 外掛分享: List Attachments Shortcode

前言介紹

  • 這款 WordPress 外掛「List Attachments Shortcode」是 2011-01-18 上架。
  • 目前有 40 個安裝啟用數。
  • 上一次更新是 2013-01-29,距離現在已有 4478 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

cgrymala |

外掛標籤

list | shortcode | attachments |

內容簡介

這個 WordPress 外掛能夠讓使用者輕易地列出一個特定文章或頁面中所有相關的附加檔案。例如,如果您想要建立一個長列表,列出多個Word文件或PDF文件,您只需要將它們附加到頁面或文章上,然後插入 shortcode 到您想放置列表的地方。

使用方式

使用這個外掛的最簡單方式就是直接使用 shortcode。預設情況下,列表會以最新上傳的附件在列表頂端,而最老的會在列表底部。列表上方不會有標題。列表會以無序的方式建立,並以 CSS 類別 "attachment-list" 來命名。

[list-attachments]

選項

type - 這是一個逗號分隔的檔案副檔名列表,用於包含在列表中的檔案副檔名。如果留空,則所有附件都會被包括在內
orderby - 可與 WordPress query_posts() 函數一起使用的值之一
order - 指定列表是按升序還是降序排列
groupby - 如果您想要將列表分割成特定的群組,您可以將某個 WordPress 文章對象參數指定為此屬性的值。例如,您可以將常見的 "description" 用於附件,以將其組織成群組。在這種情況下,您將使用 "post_content" 作為此 shortcode 的 "groupby" 參數。
before_list - 任何您希望在列表開始之前出現的 HTML 代碼
opening - 列表的開始標籤(預設為

    )
    closing - 列表的結束標籤(預設為
)
before_item - 列表中每個項目的開始標籤(預設為

  • after_item - 列表中每個項目的結束標籤(預設為
  • 這是這個外掛的第一個版本,因此肯定還有很多需要添加的功能和需要解決的問題。如果您使用這個外掛並有任何建議或問題,請在該帖子中發表評論讓我們知道。

    已知問題

    HTML 代碼參數(before_list、after_list、before_item、after_item 等)僅在透過視覺編輯器添加時有效。在透過 HTML 編輯器添加時,它們無法正確地通過 shortcode 進行傳送。

    待辦事項

    重新編寫處理 HTML 代碼參數的方法
    刪除外掛中的一些硬編碼 HTML 元素,並使它們可通過 shortcode 參數進行設置
    添加一個小工具到該外掛

    原文外掛簡介

    This WordPress plug-in allows users to easily list all of the attachments associated with a specific post or page within WordPress. For instance, if you want to create a long list of Word documents or PDF documents, you can simply attach them to the page or post, then insert the shortcode where you’d like that list to appear.
    Usage
    The simplest way to use this plug-in is just to use the shortcode. That will, by default, list the attachments with the most recent upload at the top of the list and the oldest upload at the end of the list. No heading will be included above the list. The list will be created as an unordered list with the CSS class of “attachment-list”.
    [list-attachments]
    Options

    type – a comma-separated list of file extensions that should be included in the list. If this is left empty, all attachments will be included
    orderby – any of the values that can be used with the WordPress query_posts() function
    order – indicate whether the list should be sorted in ascending or descending order
    groupby – if you would like the list split into specific groups, you can indicate any of the WordPress post object parameters as the value of this property. For instance, you can use a common “description” for your attachments to organize them into groups. In that case, you would use “post_content” as the “groupby” parameter for this shortcode
    before_list – any HTML code you want to appear before the list begins
    opening – the opening tag(s) for the list (defaults to

      )
      closing – the closing tag(s) for the list (defaults to

    )
    before_item – the opening tag(s) for each item of the list (defaults to

  • )
    after_item – the closing tag(s) for each item of the list (defaults to
  • )

    This is the first version of this plug-in, so I’m certain there are a lot of features that still need to be added and bugs that need to be worked out. If you try out the plug-in and have any suggestions or notice any issues, please comment on this post and let us know.
    Known Issues

    The HTML code arguments (before_list, after_list, before_item, after_item, etc.) only work when added through the visual editor. When added through the HTML editor, they are not sent properly through the shortcode.

    To Do

    Re-do the method of handling the HTML code arguments
    Remove the handful of hard-coded HTML elements that are in the plug-in, making them configurable through shortcode arguments
    Add a widget to the plugin

    各版本下載點

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

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


    0.1a | 0.2a | 0.3a | 0.4a | trunk | 0.4.1a |

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

    • WP Shortcodes Plugin — Shortcodes Ultimate 》Shortcodes Ultimate 是一個全面的視覺與功能性元素收集,您可以在文章編輯器、文字小工具甚至是範本檔案中使用。使用 Shortcodes Ultimate,您可以輕鬆地建...。
    • MW WP Form 》MW WP Form 可以使用 shortcode 創建帶有確認畫面的郵件表單。, , 使用 shortcode 創建表單, 可以使用確認頁面。, 頁面可以使用相同的 URL 或個別的 URL 進行...。
    • Shortcoder — Create Shortcodes for Anything 》Shortcoder 外掛可讓您建立 HTML、JavaScript、CSS 和其他代碼片段的自訂捷徑。現在,這些捷徑可以在文章/頁面中使用,並且該片段將取代其位置。, ✍ 輕鬆建立...。
    • Display Posts – Easy lists, grids, navigation, and more 》Display Posts 讓您輕鬆地列出網站上的所有內容。首先在內容編輯器中新增此短碼,以列出最近的文章清單:, [display-posts], , 按類別篩選, 若只想顯示特定類...。
    • Widget Shortcode 》這個短碼需要小工具的ID,但不需要猜測,外掛會為你生成代碼。如果你想要覆蓋小工具的標題,你可以使用 "title" 參數:, [widget id=”text-1″...。
    • Woody code snippets – Insert Header Footer Code, AdSense Ads 》需要專業的支援嗎?, 免費獲取支援, 開始獲得高級支援, , 停止反覆使用相同的內容!, 停止插入 function.php 中的 PHP 代碼!, 停止將 Google Analytics、Yan...。
    • Column Shortcodes 》此外掛提供簡單易用的短碼,在您的文章或頁面中輕鬆創建欄位。有時候,您只需要將網頁切成不同的欄位。使用此外掛,您只需選擇一個欄位的短碼,便可將欄位加...。
    • amr shortcode any widget 》使用shortcode將小工具或多個小工具或整個小工具區域(側邊欄)插入到頁面中。, 首先在正常的側邊欄中設置小工具。 檢查它是否正常運作。, 然後將所選小工具...。
    • Shortcode in Menus 》此外掛讓你可以在 WordPress 導覽選單中使用簡碼,以便可以動態生成連結。也可以讓你在導覽選單中添加完整的 HTML 段落。, 使用方法, 查看截圖。, 另外,查看...。
    • Sidebar Widgets by CodeLights 》❗ 很抱歉,由於 SiteOrigin 的 widgets API 完全更改,CodeLights 不再支援 SiteOrigin Page Builder 的原生使用。解決方案:您仍然可以在純文字編輯器中創...。
    • Advanced iFrame 》看起來您正在尋找一個 WordPress 外掛 - Advanced iFrame Pro。這個外掛可讓您使用 iframe 包含其他網頁到您的網站中,同時具有隱藏和修改元素、自動調整高度...。
    • Insert Pages 》Insert Pages 可讓您使用 Shortcode API,將任何 WordPress 內容(例如,頁面、文章、自訂文章類型)嵌入其他 WordPress 內容。它還包括一個小工具,可將頁面...。
    • Shortcodes by Angie Makes 》Shortcodes by Angie Makes 外掛為您的 WordPress 主題新增一系列易於使用的短碼,這些短碼與 Angie Makes WordPress 主題 完美搭配。, 範例, 請到此查看這些...。
    • Team Members 》這個外掛會為管理員面板增加一個「團隊」區塊,讓您可以輕鬆地在網站上展示您的員工/職員。您可以快速地將成員加入您的團隊,加入他們的照片、職位、個人簡介...。
    • Post Snippets – Custom WordPress Code Snippets Customizer 》, 建立自訂短碼和可重複使用的內容,並將它們插入到您的文章和頁面中。, , 此外掛讓您建立 HTML、PHP 程式碼或常用文字片段的庫。在文章和頁面中,您可以使用...。

    文章
    Filter
    Apply Filters
    Mastodon