{"id":5977,"date":"2019-01-30T16:00:44","date_gmt":"2019-01-30T16:00:44","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=5977"},"modified":"2023-07-28T12:43:45","modified_gmt":"2023-07-28T12:43:45","slug":"how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/","title":{"rendered":"How to Choose and Set Post Relations (Legacy)"},"content":{"rendered":"\n<p><strong><a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/\" target=\"_blank\" rel=\"noreferrer noopener\">JetEngine<\/a><\/strong> is the plugin addon for Elementor editor which allows adding the dynamic listing and grid layouts and provides a way to display the custom posts and taxonomies within any page templates.<\/p>\n\n\n\n<p>Today we\u2019ll show you how to choose the needed post relations and how to set them with the JetEngine plugin in Legacy Relationships. <\/p>\n\n\n\n<p>Feel free to use <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/jetengine-wordpress-relations-feature-settings-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Refactored Relations feature<\/strong><\/a> for more possibilities.<\/p>\n\n\n\n<p>JetEngine provides you with 3 types of such relations, so let\u2019s take a quick overview of them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-post-relations-types\">The Post Relations Types<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<h3 class=\"wp-block-heading\" id=\"onetoone-posts-relation\">One-to-one posts relation<\/h3>\n\n\n\n<p>This relations type implies that one parent post type can be connected only to one child post type. E.g., one country has only one capital, and there are no capitals that are actually related to many countries at once. So the relation between the &#8220;Country&#8221; and &#8220;Capital&#8221; post types should be \u201cone-to-one\u201d.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/one-to-one.png\" alt=\"one-to-one relation\">\n\n\n\n<h3 class=\"wp-block-heading\" id=\"onetomany-posts-relation\">One-to-many posts relation<\/h3>\n\n\n\n<p>This means that one parent post type can be related to many other child post types. E.g., one book has only one author, however, one author could have written multiple books. So the parent \u201cauthor\u201d post type should have \u201cone-to-many\u201d relations type with the \u201cbook\u201d child post type.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/one-to-many.png\" alt=\"one-to-many relations\">\n\n\n\n<h3 class=\"wp-block-heading\" id=\"manytomany-posts-relation\">Many-to-many posts relation<\/h3>\n\n\n\n<p>Allows linking a lot of parent post types to many child post types at once. E.g., the is a \u201cproduct\u201d child post type, which is related to the \u201cshop\u201d parent post type. However, there are many products in each of the shops, and there are different shops where each of the products can be sold. So, the relations are \u201cmany-to-many\u201d.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/many-to-many.png\" alt=\"many-to-many relations\">\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-create-a-post-relation\">How to Create a Post Relation<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Open the <strong><em>JetEngine &gt; Post Relation<\/em><\/strong> directory in the WordPress Dashboard. Click the &#8220;<strong>Add New<\/strong>&#8221; button and start filling in the fields. <\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/post-relations-list.png\" alt=\"post relations list\">\n\n\n\n<p>Provide the title for post relation in the <strong>Name <\/strong>field. After that, select the post type both for parent and child posts in the  <strong>Parent post type<\/strong> and <strong>Child post type<\/strong> drop-downs. Afterward, set the needed posts relation in the <strong>Relation type<\/strong> dropdown.<\/p>\n\n\n<div class=\"note-banner d-flex border-bold border-jetsmartfilters rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z\" fill=\"#FA5450\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Warning<\/div><p class=\"m-0\">Parent and child post types cannot be similar.<\/p><\/div><\/div>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/new-relation.png\" alt=\"adding new relation\">\n\n\n\n<p>In the Advanced Settings section, you can also see two toggles: <\/p>\n\n\n\n<ul>\n<li><strong>Register controls for parent post type<\/strong>. Enable this option in order to add the  <strong>Related children<\/strong> meta box to the parent post\u2019s editing page;<\/li>\n\n\n\n<li> <strong>Register controls for child post type<\/strong>. If you want to add a <strong>Related parent<\/strong> meta box to the child post\u2019s editing page &#8211; turn this option on.<\/li>\n<\/ul>\n\n\n\n<p>Finally, click the &#8220;<strong>Add Relation<\/strong>&#8221; in order to save it.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"displaying-the-related-posts-of-different-type-with-jetengine\">Displaying the Related Posts of Different Type with JetEngine<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<h3 class=\"wp-block-heading\" id=\"assign-children-to-parents\">Assign children to parents<\/h3>\n\n\n\n<p>Go to the &#8220;parent&#8221; posts menu tab, open every parent post, and assign &#8220;child&#8221; posts to it. This can be done in the <strong>Related Posts<\/strong> (in our case, it&#8217;s <strong>Related Books<\/strong>) section of the right-side menu. Just type the titles of the &#8220;child&#8221; posts there. Don&#8217;t forget to click the &#8220;<strong>Update<\/strong>&#8221; button afterward.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/related-posts.png\" alt=\"assigning child posts\">\n\n\n\n<h3 class=\"wp-block-heading\" id=\"open-the-page-in-elementor-and-customize-it\">Open the page in Elementor and customize it<\/h3>\n\n\n\n<p>Now open the <strong>Single Page<\/strong> template to which you\u2019ve decided to add the related posts, in the Elementor editor. Find the <strong>Listing Grid<\/strong> widget and drop it into the page canvas. Choose the listing template in the listing drop-down menu and proceed to the <strong>Post Query<\/strong> section.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/post-query-with-relation.png\" alt=\"post query section of listing grid settings\">\n\n\n\n<p>Add a new item and choose the &#8220;Posts&amp;Author Parameters&#8221; option in the <strong>Type <\/strong>drop-down list.<\/p>\n\n\n\n<p>Afterward, paste the <code>%related_children_from|post-type-slug%<\/code> or <code>%related_parents_from|post-type-slug%<\/code> macros into the <strong>Include posts by IDs<\/strong> field. The macro code depends on the relations between the posts, as well as the type of post template you are working with.<\/p>\n\n\n\n<p>Don\u2019t forget to replace the &#8220;<code>post-type-slug<\/code>&#8221; with an actual slug of the post type and click the &#8220;<strong>Update<\/strong>&#8221; green button at the bottom of the menu.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"grandparents-relations\">Grandparents Relations<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>This relation type allows you to make a hierarchical path between two separate relations.<\/p>\n\n\n\n<p>Let\u2019s puzzle it out on the example. As an example, we took such post types as Continents, Countries, and Tours. It is possible to create two relations <strong>Continents &gt; Countries<\/strong> and <strong>Countries &gt; Tours<\/strong> and connect these two relations in one path.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/grandparent.png\" alt=\"grandparent relation\">\n\n\n\n<p>So, to create a grandparent relation, you need to have two relations. Create them and open the relation that has the lower hierarchy. In our case, it will be the <strong>Continents &gt; Country<\/strong> relation.<\/p>\n\n\n\n<p>In the <strong>Parent Relation<\/strong> block type &#8220;grandparent_name to parent_name&#8221;. In our case, it will be &#8220;continents to country&#8221;. <\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2020\/01\/Grandparent-relation-1.png\" alt=\"relations settings\">\n\n\n\n<p>To display this type of relationship you will also need a macro code. Add the Listing Grid to the page and choose the listing related to a certain Single post. Open the Post Query section and paste one of these macro codes:<\/p>\n\n\n\n<ul>\n<li><code>%get_grandparent|from-post-type%<\/code> \u2014 get the parent post for the current post type;<\/li>\n\n\n\n<li><code>%get_grandchild|from-post-type%<\/code> \u2014 the search will go from the current post to the child&#8217;s one.<\/li>\n<\/ul>\n\n\n\n<p>Instead of \u201c<code>from-post-type<\/code>\u201d you need to enter the slug of the post type.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/grand-child.png\" alt=\"grandparent macros\">\n\n\n\n<p>It is a little overview for you to have an idea about this type of relation. To get to know more, kindly take a look at the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/jetengine-hierarchical-posts-relations-how-to-build-a-grandparent-grandchild-relations\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>full tutorial<\/strong><\/a>.<\/p>\n<\/div><\/div>\n\n\n\n<p>Now you\u2019ve created the post relations and learned to display them on the <strong>Single Page<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From this tutorial, you can get information on how to establish the post relations (in Legacy Relationships) between different post types using the JetEngine plugin for Elementor. Plus, we&#8217;ll explain what grandparent relations are.<\/p>\n","protected":false},"author":11,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[399],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Set Posts Relations (Legacy) | Crocoblock<\/title>\n<meta name=\"description\" content=\"Get more information about available varied types of post relations, and how to adjust needed post relations using the JetEngine WordPress plugin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Posts Relations (Legacy) | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Get more information about available varied types of post relations, and how to adjust needed post relations using the JetEngine WordPress plugin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-28T12:43:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/one-to-one.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/\",\"name\":\"How to Set Posts Relations (Legacy) | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2019-01-30T16:00:44+00:00\",\"dateModified\":\"2023-07-28T12:43:45+00:00\",\"description\":\"Get more information about available varied types of post relations, and how to adjust needed post relations using the JetEngine WordPress plugin.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/articles\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Choose and Set Post Relations (Legacy)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"name\":\"Help Center\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\",\"name\":\"Help Center\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"contentUrl\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"caption\":\"Help Center\"},\"image\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set Posts Relations (Legacy) | Crocoblock","description":"Get more information about available varied types of post relations, and how to adjust needed post relations using the JetEngine WordPress plugin.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Posts Relations (Legacy) | Crocoblock","og_description":"Get more information about available varied types of post relations, and how to adjust needed post relations using the JetEngine WordPress plugin.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/","og_site_name":"Help Center","article_modified_time":"2023-07-28T12:43:45+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/one-to-one.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/","name":"How to Set Posts Relations (Legacy) | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2019-01-30T16:00:44+00:00","dateModified":"2023-07-28T12:43:45+00:00","description":"Get more information about available varied types of post relations, and how to adjust needed post relations using the JetEngine WordPress plugin.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-choose-the-needed-post-relations-and-set-them-with-jetengine-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/crocoblock.com\/knowledge-base\/articles\/"},{"@type":"ListItem","position":3,"name":"How to Choose and Set Post Relations (Legacy)"}]},{"@type":"WebSite","@id":"https:\/\/crocoblock.com\/knowledge-base\/#website","url":"https:\/\/crocoblock.com\/knowledge-base\/","name":"Help Center","description":"","publisher":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization","name":"Help Center","url":"https:\/\/crocoblock.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","contentUrl":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","caption":"Help Center"},"image":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article\/5977"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/11"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=5977"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=5977"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=5977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}