內容簡介
若要在您的網頁上視覺化 Open Publishing 資料,請使用智慧替代標籤,如 [large_document_view:document.123] 或 [sidebar:newest.1:de],將其放置在您想要插入資料的位置。
這個替代標籤將被此外掛程式從 OP 伺服器擷取的資料取代。
智慧替代符號包括:[ "tag_name":"object"."object_id":"language" ]
語言是一個選擇性參數,使用它以獲取特定語言的結果。可能的值:en,de,fr,es。
您可以使用以下物件:document、bestseller、newest、most_read。
同時,您可以從品牌統計資料中存取文件計數。
要列印文件計數,請使用 ‘openpublishing_document_count’ 選項。
特色功能
Openpublishing 替代
要使替代運作,請為每個標籤名稱創建模板,您可以使用兩種不同的方式進行此操作。
使用 Elementor 外掛程式:
轉到 Elementor 頁面
建立新模板,記下模板 ID(您可以在編輯 URL 中看到它)
您可以使用 Elementor 輕鬆地樣式化您的模板
使用 WordPress 文章:
前往「頁面」>「新增」
建立新文章,將其視為模板,記下模板 ID(您可以在編輯 URL 中看到它)
(可選)您可以為每個文章分配特殊類別(例如 op-templates)以區分其他文章
在您的模板中使用特殊關鍵字:{title} {subtitle} {price} {grin_url} {source_url} {document_id} {cdn_host} {realm_id}
將新創建的模板/文章以相應 ID 加入此頁面。
用法:
要使用替代,請將此標籤與所需的 ‘tag_name’ 和 ‘object_id’ 插入到您的頁面中,例如:
<h2>我們的暢銷商品:</h2>
<div>[large_document_view:bestseller.1] [large_document_view:bestseller.2] [large_document_view:bestseller.3]</div>
這些標籤應立即被替換。
Openpublishing 文件計數
有一個定期作業,會從 OP 伺服器擷取品牌統計資料並每天保存到「文件計數」中。
除錯:
若要除錯外掛程式,請在所有文字後將下列程式碼新增至您的頁面中:
<script type="text/javascript">
var debug = document.getElementsByClassName("OP_debug");
for(i=0; i<debug.length; i++) { debug[i].style.display = 'inline'; }
</script>
這將允許您查看有關替代的更多信息。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
To visualize Open Publishing data on your page please use smart substitution tags in place you want to insert a data, like so [large_document_view:document.123] or [sidebar:newest.1:de]
This substitution tag will be replaced by the data this plugin retrieve from OP server.
Smart substitution notation contain: [ "tag_name":"object"."object_id":"language" ]
language is an optional parameter, use it to get language specific results. Possible values: en, de, fr, es.
You can use: document, bestseller, newest, most_read objects.
Also you can access document count from brand statistics.
To print document count use ‘openpublishing_document_count’ option.
Special Features
Openpublishing substitution
To make substitution work please create templates for each tag_name you would like to use. You can do this in two different ways.
Using Elementor plugin:
Go to Elementor page
Create new template, remember a template id (you can see it in the edit url)
You can easily style your template by means of Elementor
Using WordPress posts:
Go to Pages > Add New
Create new post and treat it like a template, remember a template id (you can see it in the edit url)
(Optional) you can assign special category (like op-templates) to each post to distinguish between others
Use special keywords in your template:{title} {subtitle} {price} {grin_url} {source_url} {document_id} {cdn_host} {realm_id}
Add newly created templates/posts on this page with corresponding ids.
Usage:
To use substitution please insert into your page this tag with desired ‘tag_name’ and ‘object_id’ like:
Our bestsellers:
This tags should be replaced right away.
Openpublishing document count
There is a scheduled job which is retrieving the brand statistics from OP server and saves the value to Document count on a daily basis.
Debug:
To debug plugin work please add next code into your page after all text:
This will allow you to see some more information about substitution.
