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 & Maintenance
AyeCode Ltd have committed to security and maintenance updates due to this plugins requirement in our List Manager Extension.
~~I, scribu, will not be offering support (either free or paid) for this plugin anymore.~~
If you want to help maintain the plugin, fork it on github and open pull requests.
Links: Documentation | Plugin News | Author’s Site
Screenshots
Installation
See Installing Plugins.
After activating it, refer to the Basic usage tutorial.
Additional info can be found on the wiki.
FAQ
-
The waiting icon keeps spinning forever.
-
Check for JavaScript errors. If it’s an AJAX request, check its output.
Reviews
Contributors & Developers
“Posts 2 Posts” is open source software. The following people have contributed to this plugin.
Contributors“Posts 2 Posts” has been translated into 14 locales. Thank you to the translators for their contributions.
Translate “Posts 2 Posts” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.7.4 – 2024-08-21
- WordPress v6.6 compatibility check – CHANGED
1.7.3 – 2024-04-11
- WordPress v6.5 compatibility check – CHANGED
1.7.2 – 2023-09-14
- PHP 8.2 deprecated notices – FIXED
1.7.1 – 2023-07-31
- PHP deprecated notice âCreation of dynamic propertyâ – FIXED
- Unable to delete user connection after WordPress v6.1 – FIXED
1.7 – 2023-05-23
- Update Mustache package to support PHP 8.
1.6.6
- AyeCode Ltd have committed to security and maintenance updates – INFO
- Deprecated PHP notices showing with latest WordPress – FIXED
1.6.5
- fixed error when Mustache is already loaded. props ApatheticG
- fixed WP_User_Query warning. props PatelUtkarsh
- added Chinese translation. props iwillhappy1314
1.6.4
- 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
andp2p_user_admin_column_link
filters. props PareshRadadiya
1.6.3
- 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
- fixed URL query handling. props ntns
- store
WP_Error
instance instead of callingtrigger_error()
. props MZAWeb - fixed warning when used with Multilingual Press. props dimadin
- introduced
p2p_connected_title
filter. props petitphp
1.6.1
- 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
- introduced
p2p_candidate_title
filter - introduced JavaScript API
- added Japanese translation
- various refactorings
1.5.2
- 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
- fix fatal error on activation. props benmay
1.5
- added admin dropdowns
- 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
- various bug fixes
- added âinlineâ mode for shortcodes
- replaced âtrashâ icon with âminusâ icon
- pass direction to âdefault_cbâ
1.4.2
- 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
- fixed errors in admin box
- fixed each_connected()
1.4
- 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
1.3.1
- 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
- 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
1.2
- added Tools -> 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->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
1.1.6
- 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
- added P2P_Connection_Type->replace() method
- added âself_connectionsâ flag to p2p_register_connection_type()
- made P2P_Connection_Type->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
- 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
- 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
- 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
- fixed faulty scbFramework loading
- simplified syntax for defining posts-to-users connection types
1.1
- 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
1.0.1
- 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
- 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 & drop ordering in both directions
- added get_previous(), get_next() and get_adjacent() methods to P2P_Connection_Type
- more info
0.9.5
- 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
0.9.2
- fix incorrect storage when creating a connection from the other end
- respect âreciprocalâ => false when âfromâ == âtoâ
- pass pagination numbers through number_format_i18n()
0.9.1
- fix bug with each_connected()
- add widget
- allow âfromâ and âtoâ to be arrays again
- improve RTL support
0.9
- 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->each_connected()
- allow using âconnected_metaâ and âconnected_orderbyâ together
- fix some translations
- more info
0.8
- added ability to create draft posts from the connection box. props Oren Kolker
- show post status in the connection box. props Michael Fields
- 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
0.7
- improved UI. props Alex Ciobica
- added âfieldsâ, âcontextâ and âprevent_duplicatesâ args to p2p_register_connection_type()
- more info
0.6
- 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
- more info
0.5.1
- fixed fatal error on Menus screen
0.5
- added âconnected_metaâ var to WP_Query
- attach p2p_id to each post found via WP_Query
- âconnected_toâ => âanyâ etc.
- $data parameter can also be a meta_query
- metabox bugfixes
- fixed l10n loading
- more info
0.4
- 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
0.3
- store connections using a taxonomy instead of postmeta
- more info
0.2
- UI that supports multiple related posts. props Patrik BĂłn
- added p2p_list_connected() template tag
- more info
0.1
- initial release
- more info