{"id":50227,"date":"2025-12-03T08:41:07","date_gmt":"2025-12-03T08:41:07","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=50227"},"modified":"2026-05-12T08:45:29","modified_gmt":"2026-05-12T08:45:29","slug":"query-builder-relations-query-type-overview","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/","title":{"rendered":"Query Builder Relations Query Type Overview"},"content":{"rendered":"\n<p>With the <a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>JetEngine<\/em><\/a><em> <\/em>plugin, one can create various <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/relations-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">relations<\/a> between <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-create-relationships-between-posts\/\" target=\"_blank\" rel=\"noreferrer noopener\">post types<\/a>, <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-related-custom-content-type-items\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Custom Content Types<\/strong><\/a>, users, and <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/custom-taxonomy-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">taxonomies<\/a>. Once the items have been related and connected, the relations <strong>Query <\/strong>can be built with <em>JetEngine<\/em>\u2019s <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/query-builder-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Query Builder<\/strong><\/a><strong> <\/strong>in order to display only the related items in the list.<\/p>\n\n\n\n<p>In this overview, the \u201cRelations Query\u201d <strong>Query Type <\/strong>settings are reviewed.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"No More Complex Queries! JetEngine Relations, Data Store &amp; Calculations Explained\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/2lrjBHim8XE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>The query settings can be found in the <strong><em>WordPress Dashboard &gt; JetEngine &gt; Query Builder <\/em><\/strong>directory by pressing the \u201c<strong>Add New<\/strong>\u201d button.<\/p>\n\n\n\n<p>In the <strong>General <\/strong>settings section, the following settings are available:<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings-1024x640.webp\" alt=\"relations query general settings\" class=\"wp-image-50228\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<ul>\n<li><strong>Name <\/strong>\u2014 a field where the name of the current query that will be displayed in the queries list can be specified;<\/li>\n\n\n\n<li><strong>Description <\/strong>\u2014 an optional field that can be filled in with the short description of the query to distinguish it from other queries in the <strong>Queries List<\/strong>;<\/li>\n\n\n\n<li><strong>Query Type <\/strong>\u2014 a dropdown field with all the available query types. In this case, the \u201cRelations Query\u201d option should be selected;<\/li>\n\n\n\n<li><strong>Custom Query ID <\/strong>\u2014 an optional field that can be filled with the ID that will connect the current query with the <a href=\"https:\/\/crocoblock.com\/plugins\/jetsmartfilters\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>JetSmartFilters<\/em><\/a><em> <\/em>filter. The value set here should be identical to the <strong>Query ID <\/strong>set in the filter settings and in the widget\/block\/element settings in the builder where the query is used;<\/li>\n\n\n\n<li><strong>Cache Query <\/strong>\u2014 a toggle that is activated by default. When activated, it caches the query results. It can be deactivated if some issues with query operations appear (like incorrect query results);<\/li>\n\n\n\n<li><strong>Cache Expires <\/strong>\u2014 a field that allows specifying the cache expiration time in seconds. By default, it is set to \u201c0,\u201d which means no expiration time. This setting makes the most sense if an external object cache is used (e.g., Memcached, Redis). Otherwise, the cache only persists for the duration of the single request;<\/li>\n\n\n\n<li><strong>Register Rest API Endpoint <\/strong>\u2014 a toggle that is deactivated by default. When active, the REST API endpoint is registered so the query results can be accessed remotely. Enabling this option allows specifying the <strong>Endpoint Namespace<\/strong>, <strong>Endpoint Path<\/strong>, <strong>Rest API Endpoint URL<\/strong>, <strong>Restrict Access<\/strong>, and <strong>Query Arguments<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>The next section, called <strong>Relations Query<\/strong>, allows adjusting the relation query itself. It has the following setting fields:<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relation-query-settings.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relation-query-settings-1024x640.webp\" alt=\"relation query settings\" class=\"wp-image-50229\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relation-query-settings-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relation-query-settings-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relation-query-settings-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relation-query-settings-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relation-query-settings-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relation-query-settings.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<ul>\n<li><strong>Relation <\/strong>\u2014 a dropdown field where the relation to get related items from should be selected;<\/li>\n\n\n\n<li><strong>Items to Get <\/strong>\u2014 a dropdown field where the type of the retrieved related items should be selected, can be either \u201cGet Children Items for Fixed Parent\u201d or \u201cGet Parent Items for Fixed Child\u201d;&nbsp;<\/li>\n\n\n\n<li><strong>Initial Object From <\/strong>\u2014 a dropdown field that defines which object will be used as the starting point for retrieving related items in a relations query. By default, it is set to \u201cCurrent Object ID.\u201d It&#8217;s a parent object when you want to get its children, and a child object when you want to get its parents. Among the options are:\n<ul>\n<li><strong>Current Object ID<\/strong> \u2014 shows the related items of the current post on the Single Page (for example, the query shows the related services of the current provider post), of the current active listing item, and similar contexts;<\/li>\n\n\n\n<li><strong>Current User ID <\/strong>\u2014 shows the related items of the currently logged-in user;<\/li>\n\n\n\n<li><strong>Queried User ID<\/strong> \u2014 shows the related items of the selected user, e.g., on the User Page in the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/jetengine-user-profile-builder-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Profile Builder<\/strong><\/a>;<\/li>\n\n\n\n<li><strong>Query Variable<\/strong> \u2014 shows the related items based on an object ID from the global request or WordPress query variables. If this option is selected, the <strong>Variable Name<\/strong> field appears, where the variable can be specified;<\/li>\n\n\n\n<li><strong>Current Object Variable<\/strong> \u2014 shows the related items from the object defined as current by <em>JetEngine<\/em>. If this option is selected, the <strong>Variable Name<\/strong> field appears as well;<\/li>\n\n\n\n<li><strong>Default WordPress Object (for current page) <\/strong>\u2014 always shows the related items of the global WordPress object for the current page, ignoring the context of individual listing items. For example, on a single post, it will always use the current post as the base object, even when the query is inside a listing on the same page.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Max Items to Get <\/strong>\u2014 a field that allows specifying the number of items to show. This field can be left blank to retrieve all related items.<\/li>\n<\/ul>\n\n\n\n<p>That\u2019s all about the <strong>Query Builder<\/strong>\u2019s \u201cRelations Query\u201d <strong>Query Type <\/strong>available as a part of the <em>JetEngine <\/em>plugin for WordPress websites.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This overview shows the Query Builder Relations Query Type available as a part of the JetEngine plugin functionality.<\/p>\n","protected":false},"author":9,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[405],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Query Builder Relations Query Type Overview \u2014 JetEngine | Crocoblock<\/title>\n<meta name=\"description\" content=\"Check the Query Builder Relations query type overview available as a part of the JetEngine plugin functionality for WordPress websites.\" \/>\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\/query-builder-relations-query-type-overview\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Query Builder Relations Query Type Overview \u2014 JetEngine | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Check the Query Builder Relations query type overview available as a part of the JetEngine plugin functionality for WordPress websites.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-12T08:45:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings-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=\"4 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\/query-builder-relations-query-type-overview\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/\",\"name\":\"Query Builder Relations Query Type Overview \u2014 JetEngine | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2025-12-03T08:41:07+00:00\",\"dateModified\":\"2026-05-12T08:45:29+00:00\",\"description\":\"Check the Query Builder Relations query type overview available as a part of the JetEngine plugin functionality for WordPress websites.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/#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\":\"Query Builder Relations Query Type Overview\"}]},{\"@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":"Query Builder Relations Query Type Overview \u2014 JetEngine | Crocoblock","description":"Check the Query Builder Relations query type overview available as a part of the JetEngine plugin functionality for WordPress websites.","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\/query-builder-relations-query-type-overview\/","og_locale":"en_US","og_type":"article","og_title":"Query Builder Relations Query Type Overview \u2014 JetEngine | Crocoblock","og_description":"Check the Query Builder Relations query type overview available as a part of the JetEngine plugin functionality for WordPress websites.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/","og_site_name":"Help Center","article_modified_time":"2026-05-12T08:45:29+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/11\/relations-query-general-settings-1024x640.webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/","name":"Query Builder Relations Query Type Overview \u2014 JetEngine | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2025-12-03T08:41:07+00:00","dateModified":"2026-05-12T08:45:29+00:00","description":"Check the Query Builder Relations query type overview available as a part of the JetEngine plugin functionality for WordPress websites.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/query-builder-relations-query-type-overview\/#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":"Query Builder Relations Query Type Overview"}]},{"@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\/50227"}],"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=50227"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=50227"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=50227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}