PHPackages                             lunar-build/posts-to-posts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lunar-build/posts-to-posts

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

lunar-build/posts-to-posts
==========================

1.6.5(10y ago)0193GPL-2.0+PHP

Since Apr 16Pushed 4y agoCompare

[ Source](https://github.com/lunar-build/wp-posts-to-posts)[ Packagist](https://packagist.org/packages/lunar-build/posts-to-posts)[ Docs](http://wordpress.org/plugins/posts-to-posts)[ RSS](/packages/lunar-build-posts-to-posts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (9)Used By (0)

Posts 2 Posts
=============

[](#posts-2-posts)

THIS IS A FORK OF THE ORIGINAL PLUGIN. FORKED FOR USE IN GATHER, AS PLUGIN HAS FATAL ERRORS IN PHP8 THAT NEED ADDRESSING AND ORIGINAL IS NO LONGER IN ACTIVE DEVELOPMENT.

Contributors: scribu, ciobi
Tags: connections, custom post types, relationships, many-to-many, users
Requires at least: 3.9
Tested up to: 4.3
Stable tag: 1.6.5
License: GPLv2 or later
License URI:

Efficient many-to-many connections between posts, pages, custom post types, users.

Description
-----------

[](#description)

This plugin allows you to create many-to-many relationships between posts of any type: post, page, custom etc. A few example use cases:

- manually curated lists of related posts
- post series
- products connected to retailers
- etc.

Additionally, you can create many-to-many relationships between posts and users. So, you could also implement:

- favorite posts of users
- multiple authors per post
- etc.

### Support &amp; Maintenance

[](#support--maintenance)

I, scribu, will not be offering support (either free or paid) for this plugin anymore.

Furthermore, I will not be doing any development work whatsoever.

If you want to fix a bug in the plugin or add new features, feel free to fork it [on github](https://github.com/scribu/wp-posts-to-posts). *I will not be accepting any pull requests* though, since ensuring that a code change doesn't break things takes effort, effort which I'm no longer willing to expend.

Links: [**Documentation**](http://github.com/scribu/wp-posts-to-posts/wiki) | [Plugin News](http://scribu.net/wordpress/posts-to-posts) | [Author's Site](http://scribu.net)

Installation
------------

[](#installation)

See [Installing Plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).

After activating it, refer to the [Basic usage](https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage) tutorial.

Additional info can be found on the [wiki](http://github.com/scribu/wp-posts-to-posts/wiki).

Frequently Asked Questions
--------------------------

[](#frequently-asked-questions)

### The waiting icon keeps spinning forever.

[](#the-waiting-icon-keeps-spinning-forever)

[Check for JavaScript errors](http://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors). If it's an AJAX request, check its output.

Screenshots
-----------

[](#screenshots)

1. Basic connection metabox
2. Advanced connection metabox
3. Admin column
4. Widget
5. Connection Types screen

Changelog
---------

[](#changelog)

### 1.6.5

[](#165)

- fixed error when Mustache is already loaded. props ApatheticG
- fixed WP\_User\_Query warning. props PatelUtkarsh
- added Chinese translation. props iwillhappy1314

### 1.6.4

[](#164)

- added Danish translation. props phh
- updated Swedish translation. props EyesX
- fixed issue with multiple `parse_query` calls. props hezachenary
- added `p2p_post_admin_column_link` and `p2p_user_admin_column_link` filters. props PareshRadadiya

### 1.6.3

[](#163)

- added Serbian translation. props Borisa Djuraskovic
- fixed spinner in admin box. props yamablam
- fixed JavaScript error related to Backbone. props ericandrewlewis
- made 'p2p\_connected\_title' filter work for users too. props MZAWeb
- added support for 'dropdown\_title' labels. props GaryJones
- made `get_related()` consider all connected items

### 1.6.2

[](#162)

- fixed URL query handling. props ntns
- store `WP_Error` instance instead of calling `trigger_error()`. props MZAWeb
- fixed warning when used with Multilingual Press. props dimadin
- introduced `p2p_connected_title` filter. props petitphp

### 1.6.1

[](#161)

- fixed user column handling. props versusbassz
- fixed PHP strict standards warnings. props meloniq
- added Estonian translation. props RistoNiinemets
- added Finnish translation. props danielck

### 1.6

[](#16)

- introduced `p2p_candidate_title` filter
- introduced JavaScript API
- added Japanese translation
- various refactorings

### 1.5.2

[](#152)

- fixed get\_prev() and get\_next()
- introduced get\_adjacent\_items()
- fixed admin column titles
- made admin column titles show up before the post date. props luk3thomas
- added 'help' key to 'from\_labels' and 'to\_labels' arrays. props tareq1988

### 1.5.1

[](#151)

- fix fatal error on activation. props benmay

### 1.5

[](#15)

- added [admin dropdowns](https://github.com/scribu/wp-posts-to-posts/wiki/Admin-dropdown-display)
- fixed SQL error related to user connections
- fixed 'labels' handling and added 'column\_title' subkey
- refactor metabox JavaScript using Backbone.js
- lazy-load connection candidates, for faster page loads
- lazy-load PHP classes using `spl_register_autoload()`

### 1.4.3

[](#143)

- various bug fixes
- added 'inline' mode for shortcodes
- replaced 'trash' icon with 'minus' icon
- pass direction to 'default\_cb'

### 1.4.2

[](#142)

- fixed each\_connected() returning wrapped objects
- fixed issue with user queries and get\_current\_screen()
- fixed "Delete all connections" button
- fixed bugs with reciprocal and non-reciprocal indeterminate connection types
- added Dutch translation

### 1.4.1

[](#141)

- fixed errors in admin box
- fixed each\_connected()

### 1.4

[](#14)

- added 'p2p\_init' hook
- replaced 'View All' button with '+ Create connections' toggle
- improved usability of connection candidate UI
- fixed issues related to auto-drafts
- show columns on the admin user list screen
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-1-4.html)

### 1.3.1

[](#131)

- sanitize connection fields values on save, preventing security exploits
- improved connection field default value handling
- added 'default\_cb' as an optional key when defining connection fields
- fixed parameter order for 'p2p\_admin\_box\_show' filter
- pass the current post ID to the 'p2p\_new\_post\_args' filter

### 1.3

[](#13)

- allow passing entire objects to get\_connected(), connect() etc.
- made get\_related() work with posts-to-users connections
- made each\_connected() work with simple array of posts
- introduced \[p2p\_connected\] and \[p2p\_related\] shortcodes
- allow 'default' parameter in 'fields' array
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-1-3.html)

### 1.2

[](#12)

- added Tools -&gt; Connection Types admin screen
- fixed migration script
- made p2p\_get\_connections() accept arrays of ids
- added 'separator' parameter to p2p\_list\_posts()
- made P2P\_Directed\_Type-&gt;connect() return WP\_Error instances instead of just false
- when a user is deleted, delete all the associated connections
- fixed conflict with bbPress Topics for Posts plugin
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-1-2.html)

### 1.1.6

[](#116)

- convert "View All" tab into button
- refresh candidate list after deleting a connection
- fix cardinality check
- introduce 'p2p\_connection\_type\_args' filter
- make 'connected\_type' accept an array of connection type names
- inadvertently remove support for queries without 'connected\_type' parameter

### 1.1.5

[](#115)

- added P2P\_Connection\_Type-&gt;replace() method
- added 'self\_connections' flag to p2p\_register\_connection\_type()
- made P2P\_Connection\_Type-&gt;each\_connected() work for posts-to-users connections
- made admin list table columns work for posts-to-users connections
- fixed 'from\_labels' and 'to\_labels' parameters
- fixed search being limited only to post titles

### 1.1.4

[](#114)

- show attachment thumbnail instead of title
- merged 'from\_object' into 'from' and 'to\_object' into 'to'
- made posts-to-users queries respect 'to\_query\_vars' args
- added $prop\_name parameter to P2P\_Type::each\_connected()
- fixed connection field name conflict

### 1.1.3

[](#113)

- fixed regression related to posts-to-users direction
- fixed admin columns overwriting each other
- fixed incorrect direction in admin column links
- added notices when connection type is not properly defined

### 1.1.2

[](#112)

- fixed fields not being saved for posts-to-users connections
- fixed missing "New Post" tab in admin box
- fixed notice when deleting post

### 1.1.1

[](#111)

- fixed faulty scbFramework loading
- simplified syntax for defining posts-to-users connection types

### 1.1

[](#11)

- add p2p\_type column to the wp\_p2p table
- new low-level api: p2p\_create\_connection(), p2p\_get\_connections(), p2p\_delete\_connections(), p2p\_connection\_exists()
- support posts-to-users and users-to-posts connection types in the admin
- add 'from\_labels' and 'to\_labels' args to p2p\_register\_connection\_type()
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-1-1.html)

### 1.0.1

[](#101)

- don't show metabox at all if user doesn't have the required capability
- fix checkbox handling when there are no other input fields
- improve metabox styling
- rename 'show\_ui' to 'admin\_box'
- add 'admin\_column' parameter

### 1.0

[](#10)

- widget can now list related posts
- add P2P\_Connection\_Type::get\_related() method
- add 'can\_create\_post' arg to p2p\_register\_connection\_type()
- two-box mode for `'reciprocal' => false`
- more options for 'show\_ui'
- allow checkboxes, radio buttons and textareas as connection fields
- allow drag &amp; drop ordering in both directions
- added get\_previous(), get\_next() and get\_adjacent() methods to P2P\_Connection\_Type
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-1-0.html)

### 0.9.5

[](#095)

- add '{from|to}\_query\_vars' args to p2p\_register\_connection\_type()
- add 'cardinality' arg to p2p\_register\_connection\_type()
- add 'id' arg and p2p\_type() function
- introduce p2p\_split\_posts()
- remove p2p\_connect(), p2p\_disconnect() and p2p\_get\_connected()
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-9-5.html)

### 0.9.2

[](#092)

- fix incorrect storage when creating a connection from the other end
- respect 'reciprocal' =&gt; false when 'from' == 'to'
- pass pagination numbers through number\_format\_i18n()

### 0.9.1

[](#091)

- fix bug with each\_connected()
- add widget
- allow 'from' and 'to' to be arrays again
- improve RTL support

### 0.9

[](#09)

- introduce dropdown connection fields
- introduce 'sortable' arg to p2p\_register\_connection\_type()
- introduce 'data' arg to p2p\_register\_connection\_type()
- replace 'box' arg with hooks
- replace p2p\_each\_connected() with P2P\_Post\_Type-&gt;each\_connected()
- allow using 'connected\_meta' and 'connected\_orderby' together
- fix some translations
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-9.html)

### 0.8

[](#08)

- added ability to create draft posts from the connection box. props Oren Kolker
- show post status in the connection box. props [Michael Fields](http://wordpress.mfields.org/)
- reduced number of queries by caching connection information
- revamped p2p\_each\_connected()
- introduced p2p\_list\_posts()
- introduced 'connected\_orderby', 'connected\_order' and 'connected\_order\_num' query vars
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-8.html)

### 0.7

[](#07)

- improved UI. props [Alex Ciobica](http://ciobi.ca/)
- added 'fields', 'context' and 'prevent\_duplicates' args to p2p\_register\_connection\_type()
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-7.html)

### 0.6

[](#06)

- added p2p\_each\_connected()
- fixed p2p\_is\_connected()
- made p2p\_get\_connected() return p2p\_ids even with `$direction = 'any'`
- made compatible with [Proper Network Activation](http://wordpress.org/extend/plugins/proper-network-activation)
- [more info](http://scribu.net/wordpress/posts-to-posts/version-0-6.html)

### 0.5.1

[](#051)

- fixed fatal error on Menus screen

### 0.5

[](#05)

- added 'connected\_meta' var to WP\_Query
- attach p2p\_id to each post found via WP\_Query
- 'connected\_to' =&gt; 'any' etc.
- $data parameter can also be a meta\_query
- metabox bugfixes
- fixed l10n loading
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-5.html)

### 0.4

[](#04)

- introduced 'connected\_from', 'connected\_to', 'connected' vars to WP\_Query
- replaced $reciprocal with $data as the third argument
- p2p\_register\_connection\_type() accepts an associative array as arguments
- removed p2p\_list\_connected()
- added p2p\_delete\_connection()
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-4.html)

### 0.3

[](#03)

- store connections using a taxonomy instead of postmeta
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-3.html)

### 0.2

[](#02)

- UI that supports multiple related posts. props [Patrik Bón](http://www.mrhead.sk/)
- added p2p\_list\_connected() template tag
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-2.html)

### 0.1

[](#01)

- initial release
- [more info](http://scribu.net/wordpress/posts-to-posts/p2p-0-1.html)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~177 days

Recently: every ~216 days

Total

6

Last Release

3862d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/67ccc2c17f6345a2ad366fa9f1d6e8f20177dff0077aab355d4292b170ffbfe6?d=identicon)[lunar\_tech](/maintainers/lunar_tech)

---

Top Contributors

[![scribu](https://avatars.githubusercontent.com/u/225715?v=4)](https://github.com/scribu "scribu (1383 commits)")[![c10b10](https://avatars.githubusercontent.com/u/306633?v=4)](https://github.com/c10b10 "c10b10 (15 commits)")[![andy-goat-tree](https://avatars.githubusercontent.com/u/1630719?v=4)](https://github.com/andy-goat-tree "andy-goat-tree (3 commits)")[![MZAWeb](https://avatars.githubusercontent.com/u/1390492?v=4)](https://github.com/MZAWeb "MZAWeb (3 commits)")[![RistoNiinemets](https://avatars.githubusercontent.com/u/3982627?v=4)](https://github.com/RistoNiinemets "RistoNiinemets (3 commits)")[![caseydriscoll](https://avatars.githubusercontent.com/u/870645?v=4)](https://github.com/caseydriscoll "caseydriscoll (2 commits)")[![cephasteom](https://avatars.githubusercontent.com/u/28138102?v=4)](https://github.com/cephasteom "cephasteom (2 commits)")[![ericandrewlewis](https://avatars.githubusercontent.com/u/1087646?v=4)](https://github.com/ericandrewlewis "ericandrewlewis (2 commits)")[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (2 commits)")[![johnbillion](https://avatars.githubusercontent.com/u/208434?v=4)](https://github.com/johnbillion "johnbillion (2 commits)")[![luk3thomas](https://avatars.githubusercontent.com/u/1173886?v=4)](https://github.com/luk3thomas "luk3thomas (2 commits)")[![meloniq](https://avatars.githubusercontent.com/u/1211101?v=4)](https://github.com/meloniq "meloniq (2 commits)")[![ms-studio](https://avatars.githubusercontent.com/u/241637?v=4)](https://github.com/ms-studio "ms-studio (2 commits)")[![pedro-mendonca](https://avatars.githubusercontent.com/u/7371591?v=4)](https://github.com/pedro-mendonca "pedro-mendonca (2 commits)")[![remcotolsma](https://avatars.githubusercontent.com/u/869674?v=4)](https://github.com/remcotolsma "remcotolsma (2 commits)")[![bradyvercher](https://avatars.githubusercontent.com/u/1302030?v=4)](https://github.com/bradyvercher "bradyvercher (2 commits)")[![ntns](https://avatars.githubusercontent.com/u/1618832?v=4)](https://github.com/ntns "ntns (1 commits)")[![boris-glumpler](https://avatars.githubusercontent.com/u/580004?v=4)](https://github.com/boris-glumpler "boris-glumpler (1 commits)")[![markoheijnen](https://avatars.githubusercontent.com/u/262877?v=4)](https://github.com/markoheijnen "markoheijnen (1 commits)")[![petitphp](https://avatars.githubusercontent.com/u/158572?v=4)](https://github.com/petitphp "petitphp (1 commits)")

### Embed Badge

![Health badge](/badges/lunar-build-posts-to-posts/health.svg)

```
[![Health](https://phpackages.com/badges/lunar-build-posts-to-posts/health.svg)](https://phpackages.com/packages/lunar-build-posts-to-posts)
```

###  Alternatives

[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5671.4k1](/packages/pfefferle-wordpress-activitypub)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

18238.1k2](/packages/civicrm-civicrm-drupal-8)[vaimo/composer-changelogs

Provide information about package changes based on changelog files that are bundled with releases; provide tools for generating documentation files from changelog sources

11150.5k10](/packages/vaimo-composer-changelogs)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
