{"id":48903,"date":"2025-07-31T10:37:18","date_gmt":"2025-07-31T10:37:18","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=tips-and-tricks&#038;p=48903"},"modified":"2025-08-01T10:15:42","modified_gmt":"2025-08-01T10:15:42","slug":"displaying-related-items-from-several-relations-in-one-listing","status":"publish","type":"tips-and-tricks","link":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/","title":{"rendered":"Displaying Related Items from Several Relations in One Listing"},"content":{"rendered":"\n<p>Discover how to display Related Items from several Relations in one Listing with the help of the <em>JetEngine <\/em>plugin for WordPress.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prepare-macros\">Prepare Macros<\/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>In this tutorial, we will work with two <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/relations-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Relations<\/strong><\/a>: \u201cDepartments to Doctors\u201d and \u201cDepartments to Services\u201d.\u00a0<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up-1024x640.webp\" alt=\"relations set up\" class=\"wp-image-48904\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>In our case, we need to display posts from \u201cDoctors\u201d and \u201cServices\u201d <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/custom-post-type-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Custom Post Types<\/strong><\/a> related to the current \u201cDepartment\u201d post.\u00a0<\/p>\n\n\n\n<p>Before we proceed to creating a <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/query-builder-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Query<\/strong><\/a>, we need to prepare two <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-macros-for-wordpress-relations\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Macros<\/strong><\/a>. To do it quickly and easily, proceed to <strong><em>WordPress Dashboard > JetEngine > JetEngine > <\/em><\/strong><a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/jetengine-dashboard-settings-overview\/#macros-generator\" target=\"_blank\" rel=\"noreferrer noopener\"><strong><em>Macros Generator<\/em><\/strong><\/a>.\u00a0<\/p>\n\n\n\n<p>We need to create a macro that allows us to retrieve the children posts from the \u201cDepartments to Doctors\u201d Relation.&nbsp;<\/p>\n\n\n\n<p>For this, select the \u201cRelated Items\u201d option from the <strong>Macros <\/strong>dropdown.&nbsp;<\/p>\n\n\n\n<p>In the <strong>From Relation<\/strong> input, choose the needed Relation (\u201cDepartments to Doctors\u201d in our case).&nbsp;<\/p>\n\n\n\n<p>As we need to display \u201cDoctors\u2019 \u201d posts, we select the \u201cChild Object\u201d option in the <strong>From Object (what to show)<\/strong> field.&nbsp;<\/p>\n\n\n\n<p>For the <strong>Initial Object ID From (get initial ID here)<\/strong> input, we choose the \u201cCurrent Object ID\u201d option.&nbsp;<\/p>\n\n\n\n<p>Other fields may be left empty.\u00a0<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/macros-generator-set-up.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/macros-generator-set-up-1024x640.webp\" alt=\"macros generator set up\" class=\"wp-image-48905\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/macros-generator-set-up-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/macros-generator-set-up-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/macros-generator-set-up-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/macros-generator-set-up-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/macros-generator-set-up-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/macros-generator-set-up.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Now, at the bottom of the page, you get the needed macro. Copy it and save it for now.&nbsp;<\/p>\n\n\n\n<p>Choose the second Relation (\u201cDepartments to Services\u201d in our case) in the <strong>From Relation<\/strong> input, to get the children posts from this relation as well.&nbsp;<\/p>\n\n\n\n<p>Make sure you saved both macros.\u00a0<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-an-sql-query\">Create an SQL Query<\/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>Now, let\u2019s proceed to creating an <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-query-builder-sql-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>SQL Query<\/strong><\/a>. Progress to <strong><em>WordPress Dashboard > JetEngine > Query Builder > <\/em><\/strong>click the \u201c<strong>Add New<\/strong>\u201d button.\u00a0<\/p>\n\n\n\n<p>Type the query <strong>Name<\/strong> and choose the &#8220;SQL\/AI Query&#8221; option from the <strong>Query Type<\/strong> drop-down list.<\/p>\n\n\n\n<p>Proceed to the <strong>Custom SQL Query <\/strong>section and enable the <strong>Advanced\/AI mode<\/strong> toggle.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/add-sql-query.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/add-sql-query-1024x640.webp\" alt=\"add sql query\" class=\"wp-image-48906\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/add-sql-query-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/add-sql-query-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/add-sql-query-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/add-sql-query-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/add-sql-query-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/add-sql-query.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Add the following query to the <strong>SQL Query<\/strong> section:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT ID\r\nFROM {prefix}posts\r\nWHERE ID IN (\r\n  SELECT ID FROM {prefix}posts WHERE ID IN (\r\n    %rel_get_items|23|child_object|current_object|%{\"fallback\":\"0\"}\r\n  )\r\n  UNION\r\n  SELECT ID FROM {prefix}posts WHERE ID IN (\r\n    %rel_get_items|11|child_object|current_object|%{\"fallback\":\"0\"}\r\n  )\r\n)\r<\/code><\/pre>\n\n\n\n<p>Make sure that you use the macros you got at the previous step instead of the \u201c%rel_get_items|23|child_object|current_object|%\u201d and \u201c%rel_get_items|11|child_object|current_object|%\u201d.\u00a0<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/sql-query-set-up.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/sql-query-set-up-1024x640.webp\" alt=\"sql query set up\" class=\"wp-image-48907\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/sql-query-set-up-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/sql-query-set-up-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/sql-query-set-up-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/sql-query-set-up-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/sql-query-set-up-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/sql-query-set-up.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Press the &#8220;<strong>Add Query<\/strong>&#8221; button to save the query or the &#8220;<strong>Update Query<\/strong>&#8221; button to update it.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"set-up-a-posts-query\">Set Up a Posts Query<\/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>We need to add a <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-posts-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Posts Query<\/strong><\/a> now. Proceed to <strong><em>WordPress Dashboard > JetEngine > Query Builder > <\/em><\/strong>click the \u201c<strong>Add New<\/strong>\u201d button again.\u00a0<\/p>\n\n\n\n<p>Type the query <strong>Name<\/strong> and choose the &#8220;Posts Query&#8221; <strong>Query Type<\/strong>.<\/p>\n\n\n\n<p>Scroll down to the <strong>Posts Query<\/strong> section and open the <strong>Post &amp; Page<\/strong> tab. Click the \u201c<a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/dynamic-tags-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Dynamic Tag<\/strong><\/a>\u201d icon next to the<strong> Post In<\/strong> field. Select the \u201cQuery Results\u201d option from the dropdown. In the newly appeared pop-up, choose the <strong>SQL Query<\/strong> you just created in the <strong>Query <\/strong>dropdown. And select the \u201cList of items IDs\u201d option for the <strong>Return <\/strong>field.\u00a0<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/the-post-in-field-set-up-in-the-posts-query.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/the-post-in-field-set-up-in-the-posts-query-1024x640.webp\" alt=\"the post in field set up in the posts query\" class=\"wp-image-48908\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/the-post-in-field-set-up-in-the-posts-query-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/the-post-in-field-set-up-in-the-posts-query-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/the-post-in-field-set-up-in-the-posts-query-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/the-post-in-field-set-up-in-the-posts-query-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/the-post-in-field-set-up-in-the-posts-query-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/the-post-in-field-set-up-in-the-posts-query.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Click the \u201c<strong>Apply<\/strong>\u201d button and then press the &#8220;<strong>Add Query<\/strong>&#8220;.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adjust-the-listing-template\">Adjust the Listing Template<\/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>Following the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-create-query-builder-listing-template\/#create-listing-template-with-query-builder-source\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How to Create Query Builder Listing Template<\/strong><\/a> tutorial, we created the listing template using the <strong>Posts Query<\/strong> source.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-with-posts-query-source.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-with-posts-query-source-1024x640.webp\" alt=\"listing with posts query source\" class=\"wp-image-48909\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-with-posts-query-source-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-with-posts-query-source-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-with-posts-query-source-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-with-posts-query-source-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-with-posts-query-source-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-with-posts-query-source.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Once you are ready with the settings, click the \u201c<strong>Publish<\/strong>\u201d button.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"add-the-listing-grid-to-the-single-page-template\">Add the Listing Grid to the Single Page Template<\/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>Now, we can proceed to the <strong>Single Template <\/strong>of the parent <strong>CPT <\/strong>(\u201cDepartments\u201d in this tutorial). If you are unsure about the settings for the single template, refer to our <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetthemecore\/creating-custom-post-type-archive-template-with-jetengine-listing-grid\/#how-to-create-a-single-template-in-the-elementor-editor\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How to Create a Single Template in the Elementor Editor<\/strong><\/a> tutorial.\u00a0<\/p>\n\n\n\n<p>Add the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/listing-grid-widget-overview\/\"><strong>Listing Grid<\/strong><\/a><strong> <\/strong>widget to the template.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-grid-widget-added-to-the-template.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-grid-widget-added-to-the-template-1024x640.webp\" alt=\"listing grid widget added to the template\" class=\"wp-image-48910\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-grid-widget-added-to-the-template-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-grid-widget-added-to-the-template-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-grid-widget-added-to-the-template-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-grid-widget-added-to-the-template-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-grid-widget-added-to-the-template-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/listing-grid-widget-added-to-the-template.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n<div class=\"note-banner d-flex border-bold border-jetthemecore 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=\"M9 21C9 21.5 9.4 22 10 22H14C14.6 22 15 21.5 15 21V20H9V21ZM12 2C8.1 2 5 5.1 5 9C5 11.4 6.2 13.5 8 14.7V17C8 17.5 8.4 18 9 18H15C15.6 18 16 17.5 16 17V14.7C17.8 13.4 19 11.3 19 9C19 5.1 15.9 2 12 2Z\" fill=\"#F2D23C\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Things to know<\/div><p class=\"m-0\">Make sure that none of the <strong>Custom Queries<\/strong> we created are added to the <strong>Listing Grid<\/strong> in the <strong>Custom Query<\/strong> tab. The <strong>Query<\/strong> is already set up as the source of the <strong>Listing<\/strong>, so it should not be added anywhere additionally; otherwise, the <strong>Listing Grid<\/strong> will show no results.<\/p><\/div><\/div>\n\n\n\n<p>Once you are ready with the styling settings, click the \u201c<strong>Publish<\/strong>\u201d button.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"check-the-result\">Check the Result<\/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>We are ready with the setup \u2014 let\u2019s check how it works.\u00a0<\/p>\n\n\n\n<p>The \u201cCardiology\u201d post from the \u201cDepartments\u201d <strong>CPT <\/strong>has six related posts \u2014 three from \u201cServices\u201d and three from \u201cDoctors\u201d.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/parent-cpt-has-children-posts-attached-on-the-backend.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/parent-cpt-has-children-posts-attached-on-the-backend-1024x640.webp\" alt=\"parent cpt has children posts attached on the backend\" class=\"wp-image-48911\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/parent-cpt-has-children-posts-attached-on-the-backend-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/parent-cpt-has-children-posts-attached-on-the-backend-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/parent-cpt-has-children-posts-attached-on-the-backend-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/parent-cpt-has-children-posts-attached-on-the-backend-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/parent-cpt-has-children-posts-attached-on-the-backend-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/parent-cpt-has-children-posts-attached-on-the-backend.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>And when we proceed to the front end of the \u201cCardiology\u201d post, all related posts from both <strong>CPTs,<\/strong> \u201cServices\u201d and \u201cDoctors\u201d, are displayed correctly.\u00a0<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/related-posts-from-two-cpts-are-displayed-correctly-on-the-front.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/related-posts-from-two-cpts-are-displayed-correctly-on-the-front-1024x640.webp\" alt=\"related posts from two cpts are displayed correctly on the front\" class=\"wp-image-48912\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/related-posts-from-two-cpts-are-displayed-correctly-on-the-front-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/related-posts-from-two-cpts-are-displayed-correctly-on-the-front-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/related-posts-from-two-cpts-are-displayed-correctly-on-the-front-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/related-posts-from-two-cpts-are-displayed-correctly-on-the-front-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/related-posts-from-two-cpts-are-displayed-correctly-on-the-front-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/related-posts-from-two-cpts-are-displayed-correctly-on-the-front.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n<\/div><\/div>\n\n\n\n<p>That\u2019s it. Now you know how to display <strong>Related Items<\/strong> from several <strong>Relations <\/strong>in one <strong>Listing Grid <\/strong>with the help of the <em>JetEngine <\/em>plugin for WordPress.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Discover how to display related items from several relations in one listing with the help of the JetEngine plugin for WordPress<\/p>\n","protected":false},"author":20,"featured_media":0,"template":"","format":"standard","tipstricks-tags":[359],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Displaying Related Items From Several Relations in One Listing \u2014 JetEngine | Crocoblock<\/title>\n<meta name=\"description\" content=\"Discover how to display related items from several relations in one listing with the help of the JetEngine plugin for WordPress.\" \/>\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\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Displaying Related Items From Several Relations in One Listing \u2014 JetEngine | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Discover how to display related items from several relations in one listing with the help of the JetEngine plugin for WordPress.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-01T10:15:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up-1024x640.webp\" \/>\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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/\",\"name\":\"Displaying Related Items From Several Relations in One Listing \u2014 JetEngine | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2025-07-31T10:37:18+00:00\",\"dateModified\":\"2025-08-01T10:15:42+00:00\",\"description\":\"Discover how to display related items from several relations in one listing with the help of the JetEngine plugin for WordPress.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tips & tricks\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Displaying Related Items from Several Relations in One Listing\"}]},{\"@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":"Displaying Related Items From Several Relations in One Listing \u2014 JetEngine | Crocoblock","description":"Discover how to display related items from several relations in one listing with the help of the JetEngine plugin for WordPress.","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\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/","og_locale":"en_US","og_type":"article","og_title":"Displaying Related Items From Several Relations in One Listing \u2014 JetEngine | Crocoblock","og_description":"Discover how to display related items from several relations in one listing with the help of the JetEngine plugin for WordPress.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/","og_site_name":"Help Center","article_modified_time":"2025-08-01T10:15:42+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/07\/relations-set-up-1024x640.webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/","url":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/","name":"Displaying Related Items From Several Relations in One Listing \u2014 JetEngine | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2025-07-31T10:37:18+00:00","dateModified":"2025-08-01T10:15:42+00:00","description":"Discover how to display related items from several relations in one listing with the help of the JetEngine plugin for WordPress.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/displaying-related-items-from-several-relations-in-one-listing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Tips & tricks","item":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/"},{"@type":"ListItem","position":3,"name":"Displaying Related Items from Several Relations in One Listing"}]},{"@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\/tips-and-tricks\/48903"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/tips-and-tricks"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/tips-and-tricks"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/20"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=48903"}],"wp:term":[{"taxonomy":"tipstricks-tags","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/tipstricks-tags?post=48903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}