[WordPress] 外掛分享: Pods Auto-Display

首頁外掛目錄 › Pods Auto-Display
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
4501 天前
最後更新
問題解決
WordPress 3.0.1+ v0.4.1 上架:2013-11-08

內容簡介

這個簡單的外掛會在自訂文章類型的底部顯示 Pod 的自訂欄位。它運作方式是透過篩選 the_content,因此應該可以與任何主題或模板相容。

不用說,它需要安裝 Pods Framework 外掛才能使用。

您可以選擇啟用該外掛以供某些 Pods 使用,並指定哪些欄位應自動顯示。該外掛會尋找名稱為 (pod-name)detail 的 Pods 範本。可透過篩選器來編輯該名稱:pods_auto_display_template_name(post_type)。如果找到該範本,它就會在文章內容下方顯示。

如果找不到範本,該外掛就會在文章內容下方建立無序列表。每個清單項目都會以粗體顯示欄位標籤,接著是欄位的值。空值將不會顯示。所有輸出都會被篩選,因此您可以更改它以列印表格。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.4.1) 或搜尋安裝

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

原文外掛簡介

This simple plugin displays a Pod’s custom fields at the bottom of a custom post type. It works by filtering the_content, so it should work with any theme or template.
Needless to say, it requires the Pods Framework plugin to be installed.
You have the option to enable the plugin for certain pods, and to specify which fields should be automatically displayed. The plugin will look for a Pods template with the name (pod-name)detail. This name is editable with a filter: pods_auto_display_template_name(post_type). If that template is found, it will be displayed under the post content.
If the template is not found, the plugin will create an unordered list under the post content. Each list item has the field label in bold, followed by the field value. Empty values will not be displayed. All of the output is filtered, so you could change it to print a table if you wanted to.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon