{"id":36799,"date":"2015-06-05T22:00:52","date_gmt":"2015-06-05T22:00:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/content-relations\/"},"modified":"2026-08-05T12:13:42","modified_gmt":"2026-08-05T12:13:42","slug":"content-relations","status":"publish","type":"plugin","link":"https:\/\/szl.wordpress.org\/plugins\/content-relations\/","author":14172526,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.0.2","requires":"6.6","requires_php":"7.4","requires_plugins":null,"header_name":"Content Relations","header_author":"Palasthotel <rezeption@palasthotel.de> (Edward Bock, Jana Marie Eggebrecht)","header_description":"","assets_banners_color":"","last_updated":"2026-08-05 12:13:42","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/palasthotel.de\/","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/content-relations\/","header_author_uri":"https:\/\/palasthotel.de","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2564,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"EdwardBock","date":"2015-06-05 22:00:52"},"1.0.12":{"tag":"1.0.12","author":"EdwardBock","date":"2019-05-09 07:01:41"},"1.0.14":{"tag":"1.0.14","author":"EdwardBock","date":"2022-07-27 13:13:57"},"1.0.15":{"tag":"1.0.15","author":"palasthotel","date":"2026-02-16 13:36:44"},"1.0.16":{"tag":"1.0.16","author":"palasthotel","date":"2026-08-05 09:38:43"},"1.0.3":{"tag":"1.0.3","author":"EdwardBock","date":"2017-04-20 06:39:48"},"1.0.4":{"tag":"1.0.4","author":"EdwardBock","date":"2017-10-05 08:50:35"},"1.0.5":{"tag":"1.0.5","author":"EdwardBock","date":"2018-04-09 06:29:07"},"1.0.6":{"tag":"1.0.6","author":"EdwardBock","date":"2018-04-17 08:37:32"},"1.0.7":{"tag":"1.0.7","author":"EdwardBock","date":"2018-11-12 17:26:01"},"1.1.0":{"tag":"1.1.0","author":"palasthotel","date":"2026-08-05 12:13:42"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2247331,"resolution":"128x128","location":"assets","locale":"","width":126,"height":126},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2247331,"resolution":"256x256","location":"assets","locale":"","width":251,"height":251}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.12","1.0.14","1.0.15","1.0.16","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.1.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[148076,86,2663,11163,2299],"plugin_category":[43],"plugin_contributors":[85158,274076,138992],"plugin_business_model":[],"class_list":["post-36799","plugin","type-plugin","status-publish","hentry","plugin_tags-gutenberg","plugin_tags-post","plugin_tags-related","plugin_tags-relation","plugin_tags-rest","plugin_category-customization","plugin_contributors-edwardbock","plugin_contributors-janaeggebrecht","plugin_contributors-palasthotel","plugin_committers-edwardbock","plugin_committers-palasthotel"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/content-relations\/assets\/icon-128x128.png?rev=2247331","icon_2x":"https:\/\/ps.w.org\/content-relations\/assets\/icon-256x256.png?rev=2247331","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>In the block editor, a <strong>Content Relations<\/strong> 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.<\/p>\n\n<p>A <strong>Related content<\/strong> 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.<\/p>\n\n<p><strong>Tools \u2192 Content Relations<\/strong> 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.<\/p>\n\n<p>Each related post's relations are exposed on the REST API under a <code>content_relations<\/code> field, so a headless front end can read them too. Relations to unpublished posts are hidden from anyone who cannot edit posts.<\/p>\n\n<p>A <code>WP_Query<\/code> 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.<\/p>\n\n<h3>Arbitrary section<\/h3>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin through <strong>Plugins \u2192 Add New<\/strong>, or upload it to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate it through the <strong>Plugins<\/strong> menu.<\/li>\n<li>A <strong>Content Relations<\/strong> panel appears in the block editor's document sidebar (a meta box in the classic editor), and a settings page under <strong>Tools \u2192 Content Relations<\/strong> lists the relation types.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20show%20related%20posts%20on%20the%20front%20end%3F\"><h3>How do I show related posts on the front end?<\/h3><\/dt>\n<dd><p>Add the <strong>Related content<\/strong> block (in the inserter, under the same category as the Query Loop block) to a post, and pick a relation type in its settings panel. It lists that post's related posts of that type, in the order you set in the sidebar or meta box.<\/p><\/dd>\n<dt id=\"how%20do%20i%20read%20relations%20on%20the%20front%20end%20myself%3F\"><h3>How do I read relations on the front end myself?<\/h3><\/dt>\n<dd><p>Every post's REST response carries a <code>content_relations<\/code> field with its relations. In PHP, <code>content_relations_get_relations_by_post_id( $post_id )<\/code> returns the same data.<\/p><\/dd>\n<dt id=\"are%20relations%20to%20drafts%20or%20private%20posts%20visible%3F\"><h3>Are relations to drafts or private posts visible?<\/h3><\/dt>\n<dd><p>No. On the REST API they are filtered out for anyone who cannot edit posts, and the editor's search only offers posts the current user may read.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<p><strong>Features<\/strong>\n* add a Query Loop variation for related content (3a51a66)\n* add an edit screen for a relation type, grouped by source post (a0c3b74)\n* rebuild the Tools screen as a WP_List_Table (bec0d3f)\n* rework the type-edit screen onto ph-postqueue's item table (00f4d5e)\n* show each related post's type next to its title (062ac13)<\/p>\n\n<p><strong>Bug Fixes<\/strong>\n* hide the Query Loop's post type, order and sticky controls (15385ef)\n* link the relation type's name to its edit screen (658d69c)\n* raise Requires at least to 6.6 (75fd296)\n* redirect the misspelled legacy Tools page slug (78bf51c)\n* repair and complete the translations (11270a8)\n* replace the redundant \"Back to types\" button with Reset (d48a8b5)\n* translate the JS UI strings in PHP instead of at runtime (5bdb58b)<\/p>\n\n<h4>1.0.16<\/h4>\n\n<p><strong>Bug Fixes<\/strong>\n* build the relations admin UI with the DOM instead of HTML strings (3ac2b97)\n* close information disclosure, SQL injection and CSRF holes (3d4fa95)<\/p>\n\n<h4>1.0.15<\/h4>\n\n<ul>\n<li>Fix: Remove deprecated dynamic properties<\/li>\n<\/ul>\n\n<h4>1.0.14<\/h4>\n\n<ul>\n<li>Bugfix: Filter unpublished relations from rest api<\/li>\n<\/ul>\n\n<h4>1.0.13<\/h4>\n\n<ul>\n<li>Bugfix: error when using \"Members\" plugin<\/li>\n<\/ul>\n\n<h4>1.0.12<\/h4>\n\n<ul>\n<li>Optimization: check to prevent empty types<\/li>\n<li>Optimization: if there is only one relation type this type is preselected<\/li>\n<li>Optimization: show all types again if relations types are reopened and there is no search input<\/li>\n<\/ul>\n\n<h4>1.0.11<\/h4>\n\n<ul>\n<li>Feature: Filter for meta box title.<\/li>\n<li>Optimization: post context in ajax search query for meta box content search.<\/li>\n<\/ul>\n\n<h4>1.0.10<\/h4>\n\n<ul>\n<li>Feature: Before and after table in post meta box actions.<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Feature: two new filters for meta box autocomplete args<\/li>\n<li>Optimization: Post type names in post edit meta box autocomplete<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>hookable into grid posts box<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>new public function to get the relation store for a post id<\/li>\n<li>New filter: with content_relations_add_meta_box you can disable meta box for posts<\/li>\n<li>db.php functions refactoring<\/li>\n<li>public function with ph_ prefix were deprecated<\/li>\n<li>some more public functions were deprecated<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>WP_Query extension<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Bugfix for WP multisite setups<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Sortable handler icon<\/li>\n<li>REST API compatibility<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>sortable relations<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>typo fix in function name \"ph_content_relations_add_realtion\" =&gt; \"ph_content_relations_add_relation\"<\/li>\n<li>Wordpress 4.4 compatibility tests<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Some public functions added<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First release<\/li>\n<\/ul>","raw_excerpt":"Relate posts to other posts, edit them in the block editor sidebar or a meta box, and show them with a Related content block or on the REST API.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/36799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=36799"}],"author":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/edwardbock"}],"wp:attachment":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=36799"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=36799"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=36799"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=36799"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=36799"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=36799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}