Blog / plugins / Post to Post Relationships with WCK 2.0.4

Post to Post Relationships with WCK 2.0.4

Cristian Antohe
Last Updated: 27/02/14

A new version of WordPress Creation Kit is now available: 2.0.4 with Post to Post Relationships

post to post relationships

WordPress Post to Post Relationships

In WordPress post types are often in a relationship of some sort. For example, you might want to relate a soccer player to a team. You could do it with taxonomies, but it can become cumbersome and it won’t really do what you wanted it to do.

I wanted to use a post to post relationship in my project using other plugins, but I got really stuck when I tried to integrate those in my theme! I’m really not a programmer.

Truth is, post to post relationship plugins have been around for quite some time. The CPT Select field in WCK quite some time ago, but to really make use of it you had to open up your editor and start getting really good at WP_Query.

Post to Post Relationships with Swift Templates

This is how you go from wasting hours of frustration searching Google and Stackexchange by trying to build multiple queries in your templates, to constructing a simple HTML template with some tags in it. Sounds simple enough, so let’s get going.

1. Add a CPT Select to the post type that needs to be related

Custom Post Type Select Field

2. Link the Team CPT with the Player CPT

post-to-post-relationship

3. Get access to all of the Player information when creating a Team Swift Template

post-to-post-template

No coding required

This is something that used to require hiring a developer at 50$ or more per hour to do. Now you can just create post to post relationships and templates by clicking around in your WordPress backend.

Widget

Any Swift Template shortcode can be inserted in a Text Widget. So you can list your post to post relationships with all the extra information you might need directly in your sidebar.

Drag & Drop

Since the CPT Select can be a repeater field, you can add as many post children and sort them as you see fit.

Works With Any Theme

Since this is a standalone plugin, you can swap themes without having to re-do your templates. You’ll only need to do minimal CSS touch-up and you’ll be good to go.

Got you interested? Here’s how to get it

Post To Post Relationships are included with the latest version of WordPress Creation Kit Pro and Lifetime. As always, previous clients will be able to access this via automatic updates or their account page.

Learn more about WCK

From the blog

Related Articles

Swift Templates – a straight forward alternative to WordPress templates hell

Author: Cristian Antohe
Last Updated: April 28th, 2016

I'm not a programmer... I do know some basic html and css, but I was nervous about messing with any of the templates in fear of making a bigger mess than where I started. That's a quote from one of our customers. We hear this quite a lot, not everybody is a developer. Most WordPress […]

Continue Reading

A Beginner’s Guide to Custom Post Types

Author: Lindsay Liedke
Last Updated: July 1st, 2020

WordPress Custom Post Types are the best way to create intuitive content types. This is done by having a clear differentiation between the different types of content, adding just the required parameters and fields to them, and therefore removing clusters from the sometimes overloaded WordPress admin menu. Out of the box, the WordPress content management […]

Continue Reading
wordpress monetization

Best WordPress Monetization Plugins & Tactics to Grow Your Revenue

Author: Freddy Muriuki
Last Updated: June 6th, 2024

You will agree that finding the best WordPress monetization plugins (and tactics) to grow your revenue is challenging. If that describes your situation, you're in the right place, and we have your back as always. Like you, I had big dreams when I started my first WordPress site. Also, like you, I was skeptical about […]

Continue Reading

2 thoughts on “Post to Post Relationships with WCK 2.0.4

    This CPT Select is interesting. But I notice you can add a single posttype with another.
    Is it possible to make a generic selection to multi posttypes?
    Let’s say I have 4 custom posttype of Book, Writer, Publisher and Shop.
    I’d like to make a Relationship between a Book and the other three: Writer, Publisher and Shop. All 3 of them! Is this possible?

    Reply

    I think so. You can create a 3 CPT selects, one for each publisher, writer and shop.

    The only mention is that it’s going to be a one way relationship (if you want to use Swift Templates). Meaning if you want to do a Swift Template to list publisher and all of their books, it won’t work. You’ll need custom code for that.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.