[WordPress] 外掛分享: M Similar Posts

首頁外掛目錄 › M Similar Posts
WordPress 外掛 M Similar Posts 的封面圖片
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
1350 天前
最後更新
問題解決
WordPress 5.0+ v1.3.4 上架:2013-10-21

內容簡介

此外掛提供相似或相關的文章清單,可應用於任何文章或自訂文章類型內容。

此列表可以以以下方式添加:

Gutenberg 區塊
短代碼
小工具

如果您在側邊欄添加了小工具,則只會在內容詳情頁面上出現,因為在多個內容列表頁面上,無法計算相似性。

短代碼的語法為: [magadanski-similar-posts id="" post_type="" taxonomy="" limit=""]

您可以使用以下屬性:

ID — (整數) 您想獲取相似文章的文章ID。默認值:當前文章ID。
post_type — (字符串) 您想查詢的文章類型。默認值為“post”。
taxonomy — (字符串) 您想基於此獲取相似物品的分類。默認值為“category”。
limit — (整數) 您想收到的最大結果數。默認值為 5。

相似性基於此文章和其他文章在您的博客中的共同類別(或其他分類)數量而考慮。

外掛標籤

開發者團隊

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

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

原文外掛簡介

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.

延伸相關外掛

文章
Filter
Mastodon