
內容簡介
此外掛提供相似或相關的文章清單,可應用於任何文章或自訂文章類型內容。
此列表可以以以下方式添加:
Gutenberg 區塊
短代碼
小工具
如果您在側邊欄添加了小工具,則只會在內容詳情頁面上出現,因為在多個內容列表頁面上,無法計算相似性。
短代碼的語法為: [magadanski-similar-posts id="" post_type="" taxonomy="" limit=""]
您可以使用以下屬性:
ID — (整數) 您想獲取相似文章的文章ID。默認值:當前文章ID。
post_type — (字符串) 您想查詢的文章類型。默認值為“post”。
taxonomy — (字符串) 您想基於此獲取相似物品的分類。默認值為“category”。
limit — (整數) 您想收到的最大結果數。默認值為 5。
相似性基於此文章和其他文章在您的博客中的共同類別(或其他分類)數量而考慮。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
This plugin provides a list of similar / related entries to an article or a custom post type entry.
This list could be added in the form of a:
Gutenberg Block
Shortcode
Widget
If you add a widget to the sidebar it will only appear when on the details view of an entry, as similarity cannot be calculated when on a list page of multiple entries.
The syntax for the shortcode is [magadanski-similar-posts id="" post_type="" taxonomy="" limit=""]
You can use the attributes as follows:
ID — (integer) the ID of the post you’d like to get similar posts for. Default value: the current post ID.
post_type — (string) the post type you’d like to query. Default value: “post”.
taxonomy — (string) the taxonomy based on which you’d like to get similar items. Default value: “category”.
limit — (integer) a maximum number of results you’d like to receive. Default value: 5.
The similarity is considered based on the number of common categories (or other taxonomy terms) for this post and the rest of the posts in your blog.
