[WordPress] 外掛分享: Erudus One for WordPress

首頁外掛目錄 › Erudus One for WordPress
20+
安裝啟用
尚無評分
2844 天前
最後更新
問題解決
WordPress 4.8+ v1.0.0 上架:2018-05-31

內容簡介

此外掛使用Erudus API,將產品資訊顯示在WordPress中。

Erudus為數千種食品產品提供可信賴的資料來源。Erudus資料直接來自食品製造商和供應商,提供有關食品產品的過敏原、營養素和其他重要資訊,可信度高。

要使用此外掛,您需要Erudus API憑證。

短碼

要顯示產品規格,可以使用以下短碼:

[erudus-product id=”eruduesproductid”]

只需從erudus中找到所需產品,並將id屬性替換為正確的Erudus ID。

自訂

要自訂產品資訊的顯示方式,可以將外掛程式的模板資料夾中找到的product.php複製到名為erudus的資料夾中,並編輯該文件。

模板函數

要進一步自訂和使用產品資料,可以使用模板函數erudus_get_product($erudus_id)為產品獲取資料。這將返回一個包含API中找到的所有字段的物件。

請注意,該外掛將產品資料緩存24小時。只有當需要產品資料時,才會請求新鮮資料。

外掛標籤

開發者團隊

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

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

原文外掛簡介

This plugin uses the Erudus API to display and use product information in WordPress.
Erudus provides a trusted data source for thousands of food products. The Erudus data is sourced directly from food manufacturers and suppliers, giving you reliable data on allergens, nutrients and other important information about food products.
To use this plugin you will need Erudus API credentials.
Shortcode
To show a product specification, you can use the shortcode:
[erudus-product id=”eruduesproductid”]
Simply find the product you need from erudus and replace the id attribute with the correct Erudus ID.
Customisation
To customise the display of product information, copy product.php found in the plugin’s templates folder to a folder named erudus inside your theme and edit the file.
Template Functions
To further customise and use product data, you can use the template function erudus_get_product($erudus_id) to get product data for a product. This will return an object containing all fields found in the API.
Please note that product data is cached by the plugin for 24 hours. Fresh data is only requested when product data is needed.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon