Table of Contents
A new version of WordPress Creation Kit is now available: 2.0.4 with 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.
2. Link the Team CPT with the Player CPT
3. Get access to all of the Player information when creating a Team Swift 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.
Related Articles
Swift Templates – a straight forward alternative to WordPress templates hell
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 ReadingBeginner’s Guide to: What Is WordPress?
Ever now and again the question arises with new clients that aren't really tech savvy: "What Is WordPress?" What I'm hoping to achieve with this post is to drop the technical jargon for a minute and explain in down to earth words what is WordPress, how can it help you, what is WordPress.com, what's a […]
Continue ReadingBest WordPress Monetization Plugins & Tactics to Grow Your Revenue
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
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?
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.