{"id":46140,"date":"2024-11-25T10:44:33","date_gmt":"2024-11-25T10:44:33","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=46140"},"modified":"2024-11-25T10:45:28","modified_gmt":"2024-11-25T10:45:28","slug":"how-to-set-individual-order-for-related-items","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/","title":{"rendered":"How to Set Individual Order for Related Items"},"content":{"rendered":"\n<p>In this guide, we will show you how to set the individual order for <em>JetEngine<\/em>\u2019s related items based on relations built for posts, <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-create-a-custom-post-type-based-on-jetengine-plugin\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>CPTs<\/strong><\/a>, <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/custom-content-type\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>CCTs<\/strong><\/a>, users, and terms and display the changes on the front end.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"change-the-order\">Change the Order<\/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>Go to the post\/user\/term where the related items are set. In our case, the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-create-relationships-between-posts\/\" target=\"_blank\" rel=\"noreferrer noopener\">relation is set between the two <strong>CPTs<\/strong><\/a>,<strong> <\/strong>so we proceed to the random parent post where the related items are set.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order-1024x641.webp\" alt=\"posts with default order\" class=\"wp-image-46141\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Now, change the order by dragging the items and placing them where needed. Also, press the \u201c<strong>Save order<\/strong>\u201d button in the top right corner of the list.<\/p>\n\n\n\n<p>Don\u2019t forget to save the post settings as well.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/changed-order.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/changed-order-1024x641.webp\" alt=\"changed order\" class=\"wp-image-46142\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/changed-order-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/changed-order-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/changed-order-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/changed-order-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/changed-order-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/changed-order.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-a-query\">Create a 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>Next, we will <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/query-builder-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">build a query<\/a> that will help to display the related items on the front end in the changed order. The type of query should be selected according to the type of data the related data belongs to.<\/p>\n\n\n\n<p>Depending on the type of query you want to build, the setup of the settings will vary. We will look through all the possible settings options to display the changed order of related items on the front end later.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"posts-query\">Posts query<\/h3>\n\n\n\n<p>After setting the <strong>Name <\/strong>and selecting the \u201c<a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-posts-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Posts Query<\/a>\u201d <strong>Query Type<\/strong>, head to the <strong>Posts Query <\/strong>section.<\/p>\n\n\n\n<p>There, open the <strong>Post &amp; Page <\/strong>tab and press the \u201c<strong>Dynamic Tags<\/strong>\u201d button.<\/p>\n\n\n\n<p>Find the \u201cRelated Items\u201d macro and click it to open its settings.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/related-items-option-in-the-post-in-field.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/related-items-option-in-the-post-in-field-1024x641.webp\" alt=\"related items option in the post in field\" class=\"wp-image-46143\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/related-items-option-in-the-post-in-field-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/related-items-option-in-the-post-in-field-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/related-items-option-in-the-post-in-field-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/related-items-option-in-the-post-in-field-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/related-items-option-in-the-post-in-field-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/related-items-option-in-the-post-in-field.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>In the <strong>From relation <\/strong>field, pick the relation you work with, and select whether you want to display the \u201cParent object\u201d or \u201cChild object\u201d with this query in the <strong>From object (what to show) <\/strong>field. For instance, we select the \u201cChild object\u201d option.<\/p>\n\n\n\n<p>Also, select the needed option in the <strong>Initial Object ID From (get initial ID here)<\/strong>. In our case, we pick the \u201cCurrent Object ID\u201d option.<\/p>\n\n\n\n<p>Press the \u201c<strong>Apply<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-post-and-page-tab.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-post-and-page-tab-1024x641.webp\" alt=\"posts query post and page tab\" class=\"wp-image-46144\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-post-and-page-tab-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-post-and-page-tab-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-post-and-page-tab-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-post-and-page-tab-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-post-and-page-tab-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-post-and-page-tab.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Return to the <strong>General <\/strong>tab and press the \u201c<strong>Add new sorting parameter<\/strong>\u201d button in the <strong>Order &amp; Order By <\/strong>section.<\/p>\n\n\n\n<p>Once the fields appear, select \u201cPreserve post ID order given in the \u2018Post in\u2019 option\u201d in the <strong>Order By <\/strong>field and the preferred order in the <strong>Order <\/strong>field. In our case, it\u2019s set to the \u201cFrom lowest to highest values (1, 2, 3; a, b, c)\u201d option.<\/p>\n\n\n\n<p>That\u2019s all for the basic query customization, so whenever ready, press the \u201c<strong>Add\/Update Query<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-general-tab.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-general-tab-1024x640.webp\" alt=\"posts query general tab\" class=\"wp-image-46145\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-general-tab-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-general-tab-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-general-tab-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-general-tab-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-general-tab-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-query-general-tab.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"users-query\">Users query<\/h3>\n\n\n\n<p>To build a users query, first, give it a <strong>Name <\/strong>and then select the \u201c<a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-query-builder-users-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Users Query<\/a>\u201d <strong>Query Type<\/strong>.<\/p>\n\n\n\n<p>Then, head to the <strong>Include\/Exclude <\/strong>tab and press the \u201c<strong>Dynamic Tags<\/strong>\u201d button next to the <strong>Include <\/strong>field.<\/p>\n\n\n\n<p>Find and select the \u201cRelated Items\u201d macro from the list to open its settings.&nbsp;<\/p>\n\n\n\n<p>In the opened settings, select the needed relation in the <strong>From relation <\/strong>field, the preferred object in the <strong>From Object (what to show) <\/strong>field, and the required option in the <strong>Initial Object ID From (get initial ID here) <\/strong>field.<\/p>\n\n\n\n<p>To save the settings, press the \u201c<strong>Apply<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-include-or-exclude-tab.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-include-or-exclude-tab-1024x640.webp\" alt=\"users query include or exclude tab\" class=\"wp-image-46146\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-include-or-exclude-tab-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-include-or-exclude-tab-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-include-or-exclude-tab-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-include-or-exclude-tab-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-include-or-exclude-tab-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-include-or-exclude-tab.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Next, move to the <strong>Misc <\/strong>tab. Here, open the <strong>Order By <\/strong>selector and pick the \u201cBy the included list of user IDs (requires the Include parameter)\u201d option there.<\/p>\n\n\n\n<p>Now, you can make the query live by pressing the \u201c<strong>Add\/Update Query<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-misc-tab.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-misc-tab-1024x641.webp\" alt=\"users query misc tab\" class=\"wp-image-46147\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-misc-tab-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-misc-tab-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-misc-tab-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-misc-tab-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-misc-tab-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/users-query-misc-tab.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"terms-query\">Terms query<\/h3>\n\n\n\n<p>To build a terms query, complete its <strong>Name <\/strong>and pick the \u201c<a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-query-builder-terms-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Terms Query<\/a>\u201d <strong>Query Type<\/strong>.<\/p>\n\n\n\n<p>Then, open the <strong>Include\/Exclude <\/strong>tab in the <strong>Terms Query <\/strong>section.<\/p>\n\n\n\n<p>Press the \u201c<strong>Dynamic Tags<\/strong>\u201d button next to the <strong>Include <\/strong>field. There, pick the \u201cRelated Items\u201d macro to open the additional settings.<\/p>\n\n\n\n<p>Select the relation in the <strong>From relation <\/strong>field, the object you want to display in the <strong>From Object (what to show) <\/strong>field, and the preferred option in the <strong>Initial Object ID From (get initial ID here) <\/strong>field (in our case, \u201cCurrent Object ID\u201d).<\/p>\n\n\n\n<p>Once done, press the \u201c<strong>Apply<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-include-or-exclude-tab.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-include-or-exclude-tab-1024x641.webp\" alt=\"terms query include or exclude tab\" class=\"wp-image-46148\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-include-or-exclude-tab-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-include-or-exclude-tab-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-include-or-exclude-tab-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-include-or-exclude-tab-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-include-or-exclude-tab-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-include-or-exclude-tab.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Next, return to the <strong>General <\/strong>tab and pick the \u201cMatch the order of the \u2018Include\u2019 param\u201d option in the <strong>Order By <\/strong>selector.<\/p>\n\n\n\n<p>That\u2019s all for the basic settings. Now, press the \u201c<strong>Add\/Update Query<\/strong>\u201d to save the result.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-general-tab.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-general-tab-1024x641.webp\" alt=\"terms query general tab\" class=\"wp-image-46149\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-general-tab-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-general-tab-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-general-tab-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-general-tab-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-general-tab-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/terms-query-general-tab.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"cct-query\">CCT query<\/h3>\n\n\n\n<p>To build a CCT query, complete its <strong>Name <\/strong>and pick the \u201c<a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-cct-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Custom Content Type<\/a>\u201d <strong>Query Type<\/strong>.<\/p>\n\n\n\n<p>Then, move to the <strong>Content Types Query <\/strong>section and pick the <strong>CCT <\/strong>you work within the <strong>From Content Type <\/strong>selector.<\/p>\n\n\n\n<p>Scroll down to the <strong>Query <\/strong>section and press the \u201c<strong>Add new<\/strong>\u201d button.<\/p>\n\n\n\n<p>Pick the \u201cItem ID\u201d <strong>Field<\/strong>, set the <strong>Compare <\/strong>operator to \u201cIn the list,\u201d and click the \u201c<strong>Dynamic Tags<\/strong>\u201d button next to the <strong>Value <\/strong>field.&nbsp;<\/p>\n\n\n\n<p>In the list that appeared, find and select the \u201cRelated Items\u201d option. Then, pick the relation you work within the <strong>From Relation <\/strong>field, the preferred object in the <strong>From Object (what to show) <\/strong>field, and the needed option in the <strong>Initial Object ID From (get initial ID here) <\/strong>field.<\/p>\n\n\n\n<p>Finally, press the \u201c<strong>Apply<\/strong>\u201d button to save just-set field values.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-query-section.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-query-section-1024x641.webp\" alt=\"cct query query section\" class=\"wp-image-46150\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-query-section-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-query-section-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-query-section-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-query-section-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-query-section-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-query-section.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Scroll up to the <strong>Order &amp; Order By <\/strong>section and push the \u201c<strong>Add new sorting parameter<\/strong>\u201d button.<\/p>\n\n\n\n<p>Pick the \u201cPreserve item ID order given in the query arguments\u201d option in the <strong>Order By <\/strong>field, and select the desired <strong>Order<\/strong>. In our case, it\u2019s set to \u201cFrom lowest to highest values (1, 2, 3; a, b, c)\u201d.<\/p>\n\n\n\n<p>Once all the customizations are done, press the \u201c<strong>Add\/Update Query<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-order-and-order-by-section.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-order-and-order-by-section-1024x641.webp\" alt=\"cct query order and order by section\" class=\"wp-image-46151\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-order-and-order-by-section-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-order-and-order-by-section-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-order-and-order-by-section-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-order-and-order-by-section-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-order-and-order-by-section-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/cct-query-order-and-order-by-section.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"apply-query\">Apply 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, proceed to the page where you want to use the built query. For instance, we want to query the \u201cTours\u201d (child <strong>CPT<\/strong>) <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/listing-template-in-elementor-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">listing<\/a> on the \u201cCountry\u201d (parent <strong>CPT<\/strong>) <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetthemecore\/how-to-add-a-single-post-page-template-with-elementor\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Single page template<\/strong><\/a> (part of the <a href=\"https:\/\/crocoblock.com\/plugins\/jetthemecore\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>JetThemeCore<\/em><\/a><em> <\/em>plugin\u2019s functionality).<\/p>\n\n\n\n<p>So, beforehand, we built a listing with the \u201cTours\u201d source, and now we head to the \u201cCountry\u201d <strong>Single page template <\/strong>built with <em>Elementor<\/em>.&nbsp;<\/p>\n\n\n\n<p>There, we place a <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/listing-grid-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Listing Grid<\/strong><\/a><strong> <\/strong>widget on the page template and select the built <strong>Listing <\/strong>in the <strong>General <\/strong>tab.<\/p>\n\n\n\n<p>Then, proceed to the <strong>Custom Query <\/strong>tab and activate the <strong>Use Custom Query <\/strong>toggle. Once done, pick the built query in the <strong>Custom Query <\/strong>field.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/custom-query-in-elementor.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/custom-query-in-elementor-1024x641.webp\" alt=\"custom query in elementor\" class=\"wp-image-46152\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/custom-query-in-elementor-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/custom-query-in-elementor-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/custom-query-in-elementor-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/custom-query-in-elementor-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/custom-query-in-elementor-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/custom-query-in-elementor.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\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>Now, we open the \u201cPoland\u201d page on the front end and check the order of the items. It is now displayed as we set it manually.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/listing-on-the-front-end.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/listing-on-the-front-end-1024x641.webp\" alt=\"listing on the front end\" class=\"wp-image-46153\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/listing-on-the-front-end-1024x641.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/listing-on-the-front-end-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/listing-on-the-front-end-768x481.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/listing-on-the-front-end-1536x962.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/listing-on-the-front-end-600x376.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/listing-on-the-front-end.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n<\/div><\/div>\n\n\n\n<p>That\u2019s all; now, you know how to set the individual order for <em>JetEngine<\/em>\u2019s related items on your WordPress website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to set the individual order for JetEngine\u2019s related items on your WordPress website.<\/p>\n","protected":false},"author":9,"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 Individual Order for Related Items \u2014 JetEngine | Crocoblock<\/title>\n<meta name=\"description\" content=\"Discover how to set individual order for JetEngine\u2019s related items on your WordPress website.\" \/>\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-set-individual-order-for-related-items\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Individual Order for Related Items \u2014 JetEngine | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Discover how to set individual order for JetEngine\u2019s related items on your WordPress website.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-25T10:45:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order-1024x641.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=\"8 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-set-individual-order-for-related-items\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/\",\"name\":\"How to Set Individual Order for Related Items \u2014 JetEngine | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2024-11-25T10:44:33+00:00\",\"dateModified\":\"2024-11-25T10:45:28+00:00\",\"description\":\"Discover how to set individual order for JetEngine\u2019s related items on your WordPress website.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/#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 Set Individual Order for Related Items\"}]},{\"@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 Individual Order for Related Items \u2014 JetEngine | Crocoblock","description":"Discover how to set individual order for JetEngine\u2019s related items on your WordPress website.","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-set-individual-order-for-related-items\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Individual Order for Related Items \u2014 JetEngine | Crocoblock","og_description":"Discover how to set individual order for JetEngine\u2019s related items on your WordPress website.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/","og_site_name":"Help Center","article_modified_time":"2024-11-25T10:45:28+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/11\/posts-with-default-order-1024x641.webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/","name":"How to Set Individual Order for Related Items \u2014 JetEngine | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2024-11-25T10:44:33+00:00","dateModified":"2024-11-25T10:45:28+00:00","description":"Discover how to set individual order for JetEngine\u2019s related items on your WordPress website.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-set-individual-order-for-related-items\/#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 Set Individual Order for Related Items"}]},{"@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\/46140"}],"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\/9"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=46140"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=46140"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=46140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}