CPT Relationships allows you to create bi-directional relationships between two different post types. All relationship types are supported:
- one to one relationships
- one to many relationships
- many to many relationships
Weather your creating a relationship between an author and books (one to many) or classes to students (many to many) CPT Relationships has you covered.
Once you have set up your relationships you can use the Divi modules provided by CPT-R to display your post relationships.
- CPT-R Linked Posts – Allows you to display a list or grid of posts linked to the current post. The module allows you to apply a layout from the Divi Library to be used as the single layout for the posts being displayed.
- CPT-R Related Posts – Allows you to display a list or grid of posts that have the same relationship as the current post. The module allows you to apply a layout from the Divi Library to be used as the single layout for the posts being displayed.
- CPT-R Post Title – Allows you to display the linked posts title or the title of the current post. (this module works best for one to many relationships e.g. author to books)
- CPT-R Featured Image – Allows you to display the linked posts featured image or the featured image for the current post. (this module works best for one to many relationships e.g. authors to books)
- CPT-R Post Meta – Allows you to display a custom field from the linked post. (this module works best for one to many relationships e.g. authors to books)
Please note: The DPR Post Meta module will only be available if the Advanced Custom Fields Module Plugin by Tortoise IT is installed and activated.
Advanced Custom Fields Pro
CPT Relationships comes with Advanced Custom Fields Pro out of the box. This means you have all of the features and functionality within ACF Pro available to you. The reason ACF Pro is included is because it is used behind the scenes to manage the relationships created by CPT-R. If you do not want to use ACF to create custom fields for your post types you can disable the menu option within CPT-R Settings.
Why would you need a post relationship?
Why would anyone want to link different post types when we have the option to use taxonomies? A taxonomy is a way to group posts together. For example, you could create a bookstore with a post type called ‘book’ and a taxonomy called ‘author’. The author’s taxonomy page would display the books by the author. Using the related posts module you could then display other books by the author on the books page. This is great but there are limitations. The main one being that you cannot create a page for the author as a taxonomy. As well as this taxonomies do not include a featured image and various other attributes available to you when using post types.
- cptr_linked_post_title This shortcode allows you to display the linked posts title within text content or titles within modules. The shortcode takes one parameter (id) which must be equal to the relationship id. [cptr_linked_post_title id=”cptr_author_book”] (this module works best for 1 to many relationships e.g. authors to books)
PHP Version 7.0+
Checkout the documentation first and if you still need help open a
Please scroll down for the support form
This theme, layout or plugin is comprised of two parts.
1. The PHP code and integrated HTML are licensed under the General Public
License (GPL). You will find a copy of the GPL in the same directory as this
2. All other parts, including but not limited to the CSS code, images and design are
copyrighted by the vendor concerned and are NOT licensed under GPL.
This license allows the item to be used in projects for either personal or commercial use by you or on behalf of a client. The item cannot be offered for resale either on its own, in part, or as part of a larger project including that being part of a hosting offer. Distribution of source files is not permitted.
*Support is provided by vendors directly.
Please login to access the support form. you can do so here
Follow us on Instagram
Free Treats for Smart Divi Foxes 🦊
We give you free Divi Theme Layout Packs, cheat sheets, exclusive offers and much more. 100% free and no strings attached - promised!