Introduction
Native Content Relationships (NCR) is a relationship layer for WordPress. It adds a first-class way to link content: post ↔ post, post ↔ user, post ↔ term.
You define relation types (e.g. related_to, parent_of, favorite_posts), create and remove links via a small API, and query them with WP_Query, REST, shortcodes, or blocks.
Minimal example
php
ncr_add_relation( 123, 'post', 456, 'post', 'related_to' );
$related = ncr_get_related( 123, 'post', 'related_to', [ 'limit' => 10 ] );Why NCR
- Structured storage — Dedicated indexed table (
wp_content_relations). No post meta or taxonomy hacks. - One API, many surfaces — PHP API, WP_Query, REST, shortcodes, Gutenberg blocks, Elementor. Same relationships everywhere.
- Schema stable — Backward compatibility from 1.x onward.
Next steps
- Installation — Install the plugin
- Quick Start — First relationship in minutes
- Relationships — Create, query, remove from code
- Use Cases — Products, courses, related articles, favorites
- Widget — Sidebar widget for related posts
- FAQ — Common questions
- PHP API — Full API reference
- Admin & Tools — Overview, integrity, import/export
See also
- Use cases — Products, courses, related articles, favorites
- FAQ — Common questions and answers
- Admin & Tools — Integrity checks, import/export
- Core concepts — Relation types and object kinds