內容簡介
Content Relations 外掛讓您可以將文章與其他文章連結,並為這些關聯命名及排序。透過直觀的介面,您可以輕鬆管理文章之間的關聯,提升網站內容的互動性和可讀性。
【主要功能】
• 自訂關聯類型
• 直覺式拖曳排序
• 文章側邊欄關聯編輯面板
• 相關內容區塊顯示
• 可透過 REST API 存取關聯資料
• WP_Query 擴展支援關聯查詢
外掛標籤
開發者團隊
原文外掛簡介
Content Relations lets you link a post to any other post. Relations are typed – you name the kind of relation (“see also”, “part of”, whatever fits) – and ordered by dragging.
In the block editor, a Content Relations panel in the document sidebar edits a post’s relations the same way you’d edit categories: grouped by type, saved with the rest of the post, no separate save button. The classic editor keeps the same editor in a meta box instead.
A Related content block – a variation of the core Query Loop block – lists a post’s own related posts under one relation type, in the order you set in the sidebar, meta box, or the Tools screen. Drop it in wherever a “related articles” section belongs; it uses the same layout options as any other Query Loop.
Tools → Content Relations lists every relation type in a sortable, searchable table. Opening a type there lets you reorder or remove its relations across every post that uses it, grouped by source post, with drag handles or up/down buttons.
Each related post’s relations are exposed on the REST API under a content_relations field, so a headless front end can read them too. Relations to unpublished posts are hidden from anyone who cannot edit posts.
A WP_Query extension lets a query filter by relation: give it a related post id and, optionally, a relation type, and it returns the posts related to it.
