[WordPress] 外掛分享: Display Custom Fields

前言介紹

  • 這款 WordPress 外掛「Display Custom Fields」是 2014-05-16 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2014-07-31,距離現在已有 4227 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
  • 有 1 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

teacii |

外掛標籤

meta | meta fields | display meta | custom fields | display field value |

內容簡介

此外掛可讓您在頁面或文章上顯示自訂欄位的值。允許的值為原始文字、HTML、JavaScript、JavaScript 檔案 URL、CSS 或 CSS 檔案。

從版本 1.1.x 開始,您也可以顯示任何頁面或文章的自訂欄位,只要您有 id。

此外掛的其中一個預期用途是提供即時的程式碼,而不需編輯佈景主題。通常,程式碼,尤其是 CSS,在佈景主題更改時會丟失。這種技術將確保僅在指定的頁面上加載值,並且它們將在佈景主題和其他外掛更改時仍然存在。

您還可以使用此外掛來包含 JavaScript 片段或檔案。它們將僅在指定的文章或頁面上加載。這反過來允許僅在需要時加載腳本。

您可以使用此外掛的兩種方式:
[dcf field=”custom_field_name”]
或選擇性地,您可以
– 定義欄位值的類型。默認類型為“原始值”。
– 提供頁面或文章的 ID 編號。默認情況下,它將是當前頁面或文章的 ID。
[dcf field=”custom_field_name” type=”value_type” id=’post_or_page_id_number’]

接受的值類型為:

“原始值” – 這是默認值,您不需要指定此類型。它會按原樣輸出值。您可以在值中安全地使用 HTML 代碼。

“JS” – 使用此選項指定值實際上是 JavaScript。不要用 script 標籤包裝它。請記住,$ 在 WordPress 中不是有效的 jQuery 替代品。您應該使用“jQuery”代替。

“JSF” – 您可能需要包含 JavaScript 檔案。自訂欄位的值應為完全限定的 JavaScript 檔案 URL。

“CSS” – 使用此選項指定自訂欄位中的值為 CSS 代碼。

“CSSF” – 您可能需要包含 CSS 檔案。自訂欄位的值應為完全限定的 CSS 檔案 URL。在此,我要注意以下事項:
– 在 body 中包含 CSS 檔案非常不尋常。然而,它確實可以運作。
– 有可能出現副作用,某些元素在完全載入 CSS 檔案之前可能無法正確顯示。

原文外掛簡介

This plugin allows you to display the value of a custom field on a page or post. Permitted values are raw text, html, javascript, javascript file url, css, css file.
Since version 1.1.x it also allows you to show a custom field of any page or post, provided you have the id.
One of the intended use of this plugin is to provide just in time code without editing the theme. Often code, especially css, gets lost with theme change. This techniques will ensure the values are loaded only on the given page and they will survive changes of themes and other plugins.
You can also use this to include javascript snippets or files. They will only be loaded on the given post or page. This in turn allows for loading of scripts only where needed.
You may use the plugin in two ways:
[dcf field=”name_of_custom_field”]
or optionally you can
– define the type of the field value. By default the type is “raw”.
– provide the id number of the page or post. By default, it would be the current page/post id.
[dcf field=”name_of_custom_field” type=”value_type” id=’post_or_page_id_number’]
The accepted value types are:
“raw” – this is the default and you do not need to specify this type. It outputs the value as it is. You can use html code in the values quite safely.
“js” – use this to specify that the value is actually javascript. Do not wrap it with the script tag. Remember that $ is not a valid jQuery replacement in WordPress. You should use “jQuery” instead.
“jsf” – You may need to include a javascript file. The value of the custom field should be a fully qualified javascript file url.
“css” – use this to specify css code in the value of the custom field.
“cssf” – You may need to include a css file. The value of the custom field should be a fully qualified css file url. Here I would like to note that:
– It is highly unusual to include css files in the body. However, it does work.
– There may be a side effect that some elements may not show properly until the css file is completely loaded.

各版本下載點

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

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


1.0.0 | 1.0.1 | 1.1.1 | trunk |

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

  • Advanced Custom Fields (ACF®) 》Advanced Custom Fields 可以讓 WordPress 網站成為一個完整的內容管理系統,提供您所有工具以更好管理您的數據。, 使用 Advanced Custom Fields 外掛,完全...。
  • Checkout Field Editor (Checkout Manager) for WooCommerce 》WooCommerce 結帳欄位編輯器外掛, WooCommerce 結帳欄位編輯器 (Checkout Manager) 外掛讓您可以在結帳頁面上添加 20 種不同類型的自訂欄位,並搭配直覺且易...。
  • Meta Box 》Meta Box 是一個強大、專業又輕量級的工具組,供開發者在 WordPress 中為任何自訂文章型別建立自訂的 Meta Box 與自訂欄位。, 透過 Meta Box,您可以使用超過...。
  • Pods – Custom Content Types and Fields 》使用「Pods Framework」在一個地方管理你所有自訂內容需求。, , , 建立內容類型,包括自訂文章類型、自訂分類、以及我們專屬的「進階內容類型」(ACT),...。
  • Advanced Custom Fields: Extended 》🚀 全方位增強套件,可改進WordPress和Advanced Custom Fields。此外掛旨在提供一個強大的管理框架,涵蓋了眾多改進和優化。, 此外掛需要至少 ACF Pro 5.8。,...。
  • Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager 》我們認為 WooCommerce 是 WordPress 最好的電子商務外掛,但它缺乏一些非常基本的功能,例如使用易於使用的接口自定義結帳管理器來自訂結帳欄位。您可以使用 ...。
  • Secure Custom Fields 》總結:SCF 是一款能夠擴展 WordPress 功能的外掛,使其成為一個靈活的內容管理工具。透過 SCF,管理自定義數據變得簡單高效。, , 1. 為什麼 SCF 是一個靈活的...。
  • Sydney Toolbox 》Sydney Toolbox 外掛只適用於 Sydney WordPress 主題。, 此外掛註冊了在 Sydney 主題 中所需的自定義文章類型和自定義欄位。。
  • Custom Field Suite 》Custom Field Suite (CFS) 讓您為文章添加自定義欄位。它輕量級且經過過往使用者的測試(很難出現錯誤)。, 需要了解的事項, , 我們不提供支援。, 這是一個免...。
  • Custom Field Template 》「Custom Field Template 外掛」在「編寫文章/頁面」時,新增自訂欄位的預設設定。這個模板格式基本上跟「rc:custom_field_gui 外掛」差不多,不同處在於:, ...。
  • Custom Post Types and Custom Fields creator – WCK 》WordPress Creation Kit 是由三個工具組成,可幫助您建立和維護自訂文章類型、自訂分類和最重要的是文章、頁面或自訂文章類型的自訂欄位和元框。, WCK Custom...。
  • JSM Show Post Metadata 》JSM's Show Post Metadata外掛會在文章編輯頁面底部顯示文章(例如文章、頁面和自訂文章類型)的meta key(也就是自訂欄位名稱)和它們的非序列化值。, ...。
  • Frontend Admin by DynamiApps 》這個外掛讓你可以在前端編輯及新增文章、頁面、使用者、專有名詞欄位等等。 (之前稱為 ACF Frontend), 這個外掛允許你在網站上顯示前端管理表單,讓使用者可...。
  • Advanced Custom Fields: Nav Menu Field 》使用 Nav Menu Field 外掛將導覽選單加入Advanced Custom Fields (ACF)。此外掛會在 ACF(版本 5 和 4)加入 Nav Menu 欄位類型,讓您從 WordPress 管理後台...。
  • Simple CSV/XLS Exporter 》本外掛可以讓您透過簡單的連結/按鈕,從後端或前端匯出文章為 CSV 或 XLS 檔案。, 請確保您使用 PHP 7.3 或更新版本,如果您看到任何錯誤,舊版本將不再受支...。

文章
Filter
Mastodon