Thanks to Scribu for this nice solution.
I just registered with wordpress.org simply in order to review this plugin.
I'm a seasoned programmer who's done a number of sites in WordPress, but only recently have I been attempting to use WordPress for more complicated functionality.
I spent the past two weeks trying to come up with a solution for my current project. I tried a number of hacks, from putting a bunch of encoded information in taxonomy descriptions to using my own separate database table. I was about to call it quits and build everything from the ground-up using a PHP framework.
Yesterday I discovered Posts 2 Posts. if I had only known about this plugin sooner!
Having the power to define relationships between custom post types makes so many things possible.
For instance, a recipe site:
1. Simply create a custom post type called "Ingredient". (It's very easy to write your own code to do this, but numerous plugins are also available.) An example post could be "San Marzano Tomatoes" with a description of this type of tomato, images, comments, etc.
2. Create a custom post type called "Recipe".
3. Using Posts 2 Posts create a connection between Recipe and Ingredient. The connection can define custom fields such as "Amount".
4. Create templates for viewing your custom post types, including Posts 2 Posts code for viewing the Ingredients in a Recipe, or for viewing all Recipes that include the given Ingredient.
Finished! You've just made a very powerful recipe site. Now when you create a new recipe you can easily select ingredients from handy drop-down menus in the admin screen. You can also associate each ingredient with custom fields like "amount". You can find recipes by searching for certain ingredients.
The concepts behind Posts to Posts is so powerful you'll be wondering why it hasn't already been included into the WP core..
Thanks so much to the creators of this plugin.
I just don't know how I could cope without this plugin. Websites are, by the designer of the internet, a collection of interconnected things.
Being able to define and configure the relationships using WordPress hooks means that I can easily create many copies of any system without hours of manual editing. I don't even have to log in to do anything.
Took me about 5 minutes to learn how to use and easily saved me 10 hours of custom coding on the first project alone.
Full of options.
Just perfect for theme developers !
Finally a plugin well written and really, really, really useful.
T H A N K S.
You need to write at least a little bit php. This isn't a plugin which does all the work for you, but it does what it should be and this is extremly useful.
Posts To Posts is easily in my top five best plugins, if it's not my number one. It's extremely flexible and easy to setup, follows all WordPress best practices, works like a charm and has a number of features out of the box.
I agree with others that this should be part of the wordpress core. I found it very surprising that posts can not be related to one another especially with the onset of custom posts and you get in all sorts of a muddle creating hacks and custom queries with just taxonomies. I like this plugin as the admin user interface is great. Good documentation and good support from the plugin author.
Compared to the alternatives ( I have not really tried them much ), I like this one because it sticks to relational database terminology and you can set rules for the allowed relationships which can be reflected in the admin boxes. e.g. only allow many to one relationships with posts that have a certain tag.
I also think it is a good thing that there is no attempt to create a user interface for defining the relationships. If you begin by creating the relationships in your functions.php, you quickly see how to further customise it to your exact needs.
Thinking how it could be improved? Maybe some options to allow "quick edit" to make connections. Maybe some options for "bulk-actions" for making connections.
Thanks to the author
You must log in to submit a review. You can also log in or register using the form near the top of this page.