{"id":51242,"date":"2026-03-09T08:52:11","date_gmt":"2026-03-09T08:52:11","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=tips-and-tricks&#038;p=51242"},"modified":"2026-03-09T08:52:14","modified_gmt":"2026-03-09T08:52:14","slug":"combining-and-or-relational-operators-using-an-sql-query","status":"publish","type":"tips-and-tricks","link":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/","title":{"rendered":"Combining AND\/OR Relational Operators Using an SQL Query"},"content":{"rendered":"\n<p>This tutorial demonstrates how to combine multiple <strong>Query Builder <\/strong>queries into a single SQL query to apply complex logical conditions to a <strong>Listing Grid<\/strong>.<\/p>\n\n\n\n<p>You will learn how to include posts that match at least one group of conditions and, at the same time, exclude posts that match another group of conditions by combining separate queries with \u201cAND\/OR\u201d relational operators.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-a-meta-field\">Create a Meta Field<\/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>First, we want to add a <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/meta-field-types-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">meta field<\/a> whose options will serve as the source for the queries. Since we are working with the \u201cProperties\u201d <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/custom-post-type-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Custom Post Type<\/strong><\/a>, we open its editor in the <strong><em>WordPress Dashboard &gt; JetEngine &gt; Post Types<\/em> <\/strong>directory.<\/p>\n\n\n\n<p>Scroll down to the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/custom-post-type-overview\/#meta-fields\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Meta Fields<\/strong><\/a><strong> <\/strong>section and press the \u201c<strong>New Meta Field<\/strong>\u201d button.<\/p>\n\n\n\n<p>Complete the meta field\u2019s <strong>Label<\/strong>. We complete it with the \u201cProperty Features\u201d value. The <strong>Name\/ID <\/strong>field is completed automatically, so we leave it as is.<\/p>\n\n\n\n<p>We leave the \u201cField\u201d <strong>Object type <\/strong>and set the <strong>Field type <\/strong>to \u201cCheckbox.\u201d<\/p>\n\n\n\n<p>In our case, the <strong>Source <\/strong>is set to \u201cManual Input,\u201d and we click the \u201c<strong>New Field Option<\/strong>\u201d button every time we need to add a new item to the checkbox.&nbsp;<\/p>\n\n\n\n<p>Make sure to complete the <strong>Option Value <\/strong>field with the value containing only small Latin letters, numbers, and \u201c-\u201d or \u201c_\u201d symbols.<\/p>\n\n\n\n<p>The <strong>Option label <\/strong>defines how the option will be displayed.<\/p>\n\n\n\n<p>You can also activate the <strong>Is checked (selected) <\/strong>toggle to make the current option enabled in all posts by default.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field-1024x640.webp\" alt=\"pool option in the property features meta field\" class=\"wp-image-51221\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>This way, we add such options: \u201cPool,\u201d \u201cGarden,\u201d \u201cSea View,\u201d \u201cParking,\u201d and \u201cPet Friendly.\u201d<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/meta-field-options-and-save-as-array-toggle-activated.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/meta-field-options-and-save-as-array-toggle-activated-1024x640.webp\" alt=\"meta field options and save as array toggle activated\" class=\"wp-image-51222\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/meta-field-options-and-save-as-array-toggle-activated-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/meta-field-options-and-save-as-array-toggle-activated-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/meta-field-options-and-save-as-array-toggle-activated-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/meta-field-options-and-save-as-array-toggle-activated-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/meta-field-options-and-save-as-array-toggle-activated-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/meta-field-options-and-save-as-array-toggle-activated.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>When the meta field is adjusted, press the \u201c<strong>Update Post Type<\/strong>\u201d button to save the post type settings.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"build-a-listing\">Build a Listing<\/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 want to add a <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/listing-template-in-elementor-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Listing template<\/strong><\/a><strong> <\/strong>to store all \u201cProperties\u201d <strong>CPT <\/strong>posts. You can do it in the <strong><em>WordPress Dashboard &gt; JetEngine &gt; Listings\/Components <\/em><\/strong>page.<\/p>\n\n\n\n<p>Press the \u201c<strong>Add New item<\/strong>\u201d button to open the preediting pop-up.<\/p>\n\n\n\n<p>Leave the \u201cPosts\u201d <strong>Listing source<\/strong>. In the <strong>From post type <\/strong>dropdown, pick the post type you want to build a <strong>Listing template <\/strong>for.<\/p>\n\n\n\n<p>Complete the <strong>Listing item name <\/strong>(for example, we set the \u201cProperties Listing item\u201d name) and select the editor you want to work with. We select the \u201cElementor\u201d option.<\/p>\n\n\n\n<p>Click the \u201c<strong>Create Listing Item<\/strong>\u201d button to proceed to the editor.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/setup-listing-item-pop-up.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/setup-listing-item-pop-up-1024x640.webp\" alt=\"setup listing item pop-up\" class=\"wp-image-51223\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/setup-listing-item-pop-up-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/setup-listing-item-pop-up-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/setup-listing-item-pop-up-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/setup-listing-item-pop-up-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/setup-listing-item-pop-up-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/setup-listing-item-pop-up.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>When the editor opens, add the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/dynamic-widgets-and-blocks\/\" target=\"_blank\" rel=\"noreferrer noopener\">dynamic widgets<\/a> that display the listing content. For instance, we add <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-dynamic-link-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Dynamic Links<\/strong><\/a> and <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-dynamic-terms-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Dynamic Terms<\/strong><\/a>. Additionally, we place the <strong>Icon List<\/strong>, <strong>Headline<\/strong>, and <strong>Star Rating <\/strong>widgets to showcase needed content.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-link-widget-in-the-listing-template.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-link-widget-in-the-listing-template-1024x640.webp\" alt=\"dynamic link widget in the listing template\" class=\"wp-image-51224\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-link-widget-in-the-listing-template-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-link-widget-in-the-listing-template-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-link-widget-in-the-listing-template-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-link-widget-in-the-listing-template-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-link-widget-in-the-listing-template-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-link-widget-in-the-listing-template.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>We also want to display the \u201cProperty Features\u201d meta field\u2019s values related to posts, so we add a <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/dynamic-field-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Dynamic Field<\/strong><\/a><strong> <\/strong>to the canvas.<\/p>\n\n\n\n<p>Pick the \u201cMeta Data\u201d <strong>Source<\/strong> and the meta field you work with in the <strong>Meta Field <\/strong>dropdown.<\/p>\n\n\n\n<p>Since we use the \u201cCheckbox\u201d meta field, the <strong>Dynamic Field<\/strong> will initially display an error message, as we need to use a callback to render the field data in the current format.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-field-general-settings.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-field-general-settings-1024x640.webp\" alt=\"dynamic field general settings\" class=\"wp-image-51225\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-field-general-settings-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-field-general-settings-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-field-general-settings-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-field-general-settings-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-field-general-settings-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-field-general-settings.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>To do so, activate the <strong>Filter field output<\/strong> toggle in the <strong>Dynamic Field <\/strong>settings, then select the appropriate <strong>Callback<\/strong>. In the case of the \u201cCheckbox\u201d meta field, the \u201cMultiple select field values,\u201d \u201cCheckbox field values,\u201d and \u201cChecked values list\u201d options can be selected. For example, we pick the \u201cCheckbox field values\u201d option.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/checkbox-field-values-callback-selected-in-the-dynamic-field.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/checkbox-field-values-callback-selected-in-the-dynamic-field-1024x640.webp\" alt=\"checkbox field values callback selected in the dynamic field\" class=\"wp-image-51226\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/checkbox-field-values-callback-selected-in-the-dynamic-field-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/checkbox-field-values-callback-selected-in-the-dynamic-field-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/checkbox-field-values-callback-selected-in-the-dynamic-field-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/checkbox-field-values-callback-selected-in-the-dynamic-field-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/checkbox-field-values-callback-selected-in-the-dynamic-field-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/checkbox-field-values-callback-selected-in-the-dynamic-field.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Add more content and style up the listing as needed, and press the \u201c<strong>Publish<\/strong>\u201d button when ready.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"build-a-query-for-including-items\">Build a Query for Including Items<\/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 should add a <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/query-builder-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">query<\/a> that will later include only the needed items in the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/listing-grid-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Listing Grid<\/strong><\/a>. To build it, go to <strong><em>WordPress Dashboard &gt; JetEngine &gt; Query Builder <\/em><\/strong>and click \u201c<strong>Add New<\/strong>.\u201d<\/p>\n\n\n\n<p>Give the query a <strong>Name<\/strong>. In our case, it\u2019s \u201cInclude Garden and Sea View\u201d.<\/p>\n\n\n\n<p>We leave the default \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>and move to the <strong>Posts Query <\/strong>section.<\/p>\n\n\n\n<p>In the <strong>General <\/strong>tab, pick the <strong>Post Type <\/strong>you work with. In our case, it\u2019s \u201cProperties.\u201d<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1024x640.webp\" alt=\"include garden and sea view query general settings\" class=\"wp-image-51227\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Open the <strong>Meta Query <\/strong>tab and press the \u201c<strong>Add new clause<\/strong>\u201d button.<\/p>\n\n\n\n<p>In the <strong>Field key\/name <\/strong>field, enter the <strong>Name\/ID<\/strong> of your meta field. We enter the \u201cproperty_features\u201d value here.<\/p>\n\n\n\n<p>Set the \u201cLike\u201d operator in the <strong>Compare<\/strong> field.<\/p>\n\n\n\n<p>In the <strong>Value <\/strong>field, place the <strong>Option Value <\/strong>of the target meta field. In our case, \u201cgarden.\u201d<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/garden-meta-query-clause.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/garden-meta-query-clause-1024x640.webp\" alt=\"garden meta query clause\" class=\"wp-image-51228\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/garden-meta-query-clause-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/garden-meta-query-clause-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/garden-meta-query-clause-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/garden-meta-query-clause-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/garden-meta-query-clause-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/garden-meta-query-clause.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>In the same way, we add another clause, with the \u201csea-view\u201d value this time.<\/p>\n\n\n\n<p>Scrolling down below the clauses, pick the \u201cOr\u201d <strong>Relation<\/strong>. This relation allows the query to return posts that match at least one of the specified meta values. In this case, a post will be included if either the \u201cgarden\u201d or \u201csea-view\u201d option is selected.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/sea-view-meta-query-clause.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/sea-view-meta-query-clause-1024x640.webp\" alt=\"sea view meta query clause\" class=\"wp-image-51229\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/sea-view-meta-query-clause-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/sea-view-meta-query-clause-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/sea-view-meta-query-clause-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/sea-view-meta-query-clause-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/sea-view-meta-query-clause-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/sea-view-meta-query-clause.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Once done, press the \u201c<strong>Add Query<\/strong>\u201d button.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"build-a-query-for-excluding-items\">Build a Query for Excluding Items<\/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 should add a second query, which will later exclude the necessary items from the <strong>Listing Grid<\/strong>.<\/p>\n\n\n\n<p>So, one more time, we go to <strong><em>WordPress Dashboard &gt; JetEngine &gt; Query Builder <\/em><\/strong>and click the \u201c<strong>Add New<\/strong>\u201d button.<\/p>\n\n\n\n<p>Complete the <strong>Name <\/strong>of the query; now, we enter the \u201cExclude Pool\u201d name.<\/p>\n\n\n\n<p>Again, the <strong>Query Type <\/strong>is left to \u201cPosts Query\u201d.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-pool-query-general-settings.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-pool-query-general-settings-1024x640.webp\" alt=\"exclude pool query general settings\" class=\"wp-image-51230\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-pool-query-general-settings-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-pool-query-general-settings-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-pool-query-general-settings-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-pool-query-general-settings-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-pool-query-general-settings-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-pool-query-general-settings.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Move to the <strong>Posts Query <\/strong>section. Here, pick the <strong>Post Type <\/strong>you work with (in our case, \u201cProperties.\u201d)<\/p>\n\n\n\n<p>Open the <strong>Meta Query <\/strong>tab and press the \u201c<strong>Add new clause<\/strong>\u201d button to adjust the meta query clause.<\/p>\n\n\n\n<p>In the <strong>Field key\/name<\/strong>, put the <strong>Name\/ID <\/strong>of the meta field. In our case, we put the \u201cproperty_features\u201d value.<\/p>\n\n\n\n<p>Set the \u201cNot like\u201d <strong>Compare <\/strong>operator and complete the <strong>Value <\/strong>field with the meta field\u2019s option you want to exclude from the <strong>Listing Grid <\/strong>later. In our case, \u201cpool.\u201d<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-meta-query-clause.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-meta-query-clause-1024x640.webp\" alt=\"pool meta query clause\" class=\"wp-image-51231\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-meta-query-clause-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-meta-query-clause-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-meta-query-clause-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-meta-query-clause-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-meta-query-clause-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-meta-query-clause.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Once the query is ready, press the \u201c<strong>Add Query<\/strong>\u201d button to save the result.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"build-an-sql-query\">Build 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, it\u2019s time to combine two built queries in one to merge their results later in one <strong>Listing Grid<\/strong>.<\/p>\n\n\n\n<p>In the <strong><em>WordPress Dashboard &gt; JetEngine &gt; Query Builder <\/em><\/strong>directory, press the \u201c<strong>Add New Query<\/strong>\u201d button.<\/p>\n\n\n\n<p>Give a <strong>Name <\/strong>to the <strong>Query<\/strong>. In our example, it\u2019s \u201cProperty Features Query.\u201d<\/p>\n\n\n\n<p>Change the <strong>Query Type <\/strong>to \u201c<a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-query-builder-sql-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL\/AI Query<\/a>\u201d and move to the <strong>Custom SQL Query <\/strong>section.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/property-features-query-general-settings.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/property-features-query-general-settings-1024x640.webp\" alt=\"property features query general settings\" class=\"wp-image-51232\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/property-features-query-general-settings-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/property-features-query-general-settings-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/property-features-query-general-settings-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/property-features-query-general-settings-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/property-features-query-general-settings-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/property-features-query-general-settings.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Choose the \u201cposts\u201d option from the <strong>From table <\/strong>selector. Since the <strong>Listing Grid <\/strong>works with WordPress posts, selecting the \u201cposts\u201d table allows <em>JetEngine <\/em>to retrieve standard post objects.<\/p>\n\n\n\n<p>In the <strong>Where (query clauses) <\/strong>section, press the \u201c<strong>Add new<\/strong>\u201d button to add a new clause.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/posts-table-selected-and-where-query-settings-section-in-the-query-settings.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/posts-table-selected-and-where-query-settings-section-in-the-query-settings-1024x640.webp\" alt=\"posts table selected and where query settings section in the query settings\" class=\"wp-image-51233\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/posts-table-selected-and-where-query-settings-section-in-the-query-settings-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/posts-table-selected-and-where-query-settings-section-in-the-query-settings-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/posts-table-selected-and-where-query-settings-section-in-the-query-settings-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/posts-table-selected-and-where-query-settings-section-in-the-query-settings-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/posts-table-selected-and-where-query-settings-section-in-the-query-settings-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/posts-table-selected-and-where-query-settings-section-in-the-query-settings.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>In the <strong>Column <\/strong>dropdown, pick the \u201cID\u201d option.&nbsp;<\/p>\n\n\n\n<p>Set the <strong>Compare <\/strong>operator to \u201cIn the list.\u201d<\/p>\n\n\n\n<p>Next, press the \u201c<strong>Dynamic tag<\/strong>\u201d button next to the <strong>Value <\/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\/2026\/03\/dynamic-tag-button-next-to-the-value-field.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-tag-button-next-to-the-value-field-1024x640.webp\" alt=\"dynamic tag button next to the value field\" class=\"wp-image-51234\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-tag-button-next-to-the-value-field-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-tag-button-next-to-the-value-field-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-tag-button-next-to-the-value-field-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-tag-button-next-to-the-value-field-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-tag-button-next-to-the-value-field-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/dynamic-tag-button-next-to-the-value-field.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Find the \u201cQuery Results\u201d option and click it to open its settings. This dynamic tag lets you reuse the results of another query within the current SQL query.<\/p>\n\n\n\n<p>Pick the first query you\u2019ve built in the <strong>Query <\/strong>field and select the \u201cList of items IDs\u201d option in the <strong>Return<\/strong> field.<\/p>\n\n\n\n<p>Don\u2019t forget to click the \u201c<strong>Apply<\/strong>\u201d button to save the changes.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1-1024x640.webp\" alt=\"include garden and sea view query selected\" class=\"wp-image-51235\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/include-garden-and-sea-view-query-selected-1.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Now, we need to add another clause. So, push the \u201c<strong>Add new<\/strong>\u201d button to open the new clause settings.<\/p>\n\n\n\n<p>In the <strong>Column <\/strong>field, pick the \u201cID\u201d option and set the <strong>Compare <\/strong>operator to \u201cIn the list.\u201d&nbsp;<\/p>\n\n\n\n<p>Press the \u201c<strong>Dynamic tag<\/strong>\u201d button next to the <strong>Value <\/strong>field and find the \u201cQuery Results\u201d option.<\/p>\n\n\n\n<p>Click it to open its settings. Select the <strong>Query <\/strong>that excludes items and pick the \u201cList of items IDs\u201d option from the <strong>Return <\/strong>field.<\/p>\n\n\n\n<p>When 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\/2026\/03\/exclude-query-selected.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-query-selected-1024x640.webp\" alt=\"exclude query selected\" class=\"wp-image-51236\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-query-selected-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-query-selected-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-query-selected-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-query-selected-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-query-selected-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/exclude-query-selected.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Below the <strong>Where (query clauses) <\/strong>section, select the \u201cAnd\u201d option in the <strong>Where Relation<\/strong> field. This relation ensures that both conditions are applied simultaneously.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/where-relation-set-to-and.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/where-relation-set-to-and-1024x640.webp\" alt=\"where relation set to and\" class=\"wp-image-51237\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/where-relation-set-to-and-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/where-relation-set-to-and-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/where-relation-set-to-and-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/where-relation-set-to-and-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/where-relation-set-to-and-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/where-relation-set-to-and.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Also, scroll down to the bottom of the settings and pick the \u201cPost\u201d option in the <strong>Cast result to instance of object <\/strong>dropdown field. It is required for the <strong>Listing Grid <\/strong>to recognize the results as standard posts and correctly display dynamic content such as featured images, meta fields, and checkbox values.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/cast-result-to-instance-of-object-set-to-post.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/cast-result-to-instance-of-object-set-to-post-1024x640.webp\" alt=\"cast result to instance of object set to post\" class=\"wp-image-51238\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/cast-result-to-instance-of-object-set-to-post-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/cast-result-to-instance-of-object-set-to-post-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/cast-result-to-instance-of-object-set-to-post-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/cast-result-to-instance-of-object-set-to-post-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/cast-result-to-instance-of-object-set-to-post-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/cast-result-to-instance-of-object-set-to-post.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>When the query is ready, press the \u201c<strong>Add Query<\/strong>\u201d button.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"edit-a-page-and-add-a-listing-to-it\">Edit a Page and Add a Listing to It<\/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>It\u2019s time to add\/edit the page where the <strong>Listing Grid <\/strong>will be placed.<\/p>\n\n\n\n<p>Go to <strong><em>WordPress Dashboard &gt; Pages &gt; All Pages <\/em><\/strong>and find the page you want to edit or build a new one.&nbsp;<\/p>\n\n\n\n<p>To build a new one, press the \u201c<strong>Add Page<\/strong>\u201d button. We build a page in the Elementor page builder; however, you can work in the other editor if preferred.<\/p>\n\n\n\n<p>Find and place the <strong>Listing Grid <\/strong>on the page, then select the <strong>Listing <\/strong>you built.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/listing-grid-general-settings-in-elementor.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/listing-grid-general-settings-in-elementor-1024x640.webp\" alt=\"listing grid general settings in elementor\" class=\"wp-image-51239\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/listing-grid-general-settings-in-elementor-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/listing-grid-general-settings-in-elementor-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/listing-grid-general-settings-in-elementor-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/listing-grid-general-settings-in-elementor-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/listing-grid-general-settings-in-elementor-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/listing-grid-general-settings-in-elementor.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Move to the <strong>Custom Query <\/strong>tab and activate the <strong>Use Custom Query <\/strong>toggle.&nbsp;<\/p>\n\n\n\n<p>In the <strong>Custom Query <\/strong>selector, pick the built SQL query.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/custom-query-tab-of-the-listing-grid-widget-in-elementor.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/custom-query-tab-of-the-listing-grid-widget-in-elementor-1024x640.webp\" alt=\"custom query tab of the listing grid widget in elementor\" class=\"wp-image-51240\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/custom-query-tab-of-the-listing-grid-widget-in-elementor-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/custom-query-tab-of-the-listing-grid-widget-in-elementor-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/custom-query-tab-of-the-listing-grid-widget-in-elementor-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/custom-query-tab-of-the-listing-grid-widget-in-elementor-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/custom-query-tab-of-the-listing-grid-widget-in-elementor-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/custom-query-tab-of-the-listing-grid-widget-in-elementor.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Adjust and style the page, then save it.<\/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>Proceed to the front end of the page you have just edited to check the result.<\/p>\n\n\n\n<p>As you can observe, the <strong>Listing Grid <\/strong>now includes items with the \u201cGarden\u201d and \u201cSea View\u201d meta field options selected, but excludes items with the \u201cPool\u201d options selected.<\/p>\n\n\n\n<p>The <strong>Listing Grid <\/strong>will be queried based on the meta field options you have included and excluded.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/queried-listing-grid-on-the-front-end.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/queried-listing-grid-on-the-front-end-1024x640.webp\" alt=\"queried listing grid on the front end\" class=\"wp-image-51241\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/queried-listing-grid-on-the-front-end-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/queried-listing-grid-on-the-front-end-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/queried-listing-grid-on-the-front-end-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/queried-listing-grid-on-the-front-end-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/queried-listing-grid-on-the-front-end-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/queried-listing-grid-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 about combining \u201cAND\/OR\u201d relational operators through SQL query by using the <em>JetEngine <\/em>plugin for WordPress websites.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, you will learn how to combine \u201cAND\/OR\u201d Relational operators in JetEngine\u2019s Query in order to include some items from the Listing Grid and exclude others.<\/p>\n","protected":false},"author":9,"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>Combining AND\/OR Relational Operators Through SQL Query \u2013 JetEngine | Crocoblock<\/title>\n<meta name=\"description\" content=\"Discover how to combine \u201cAND\u201d and \u201cOR\u201d relational operators through SQL query.\" \/>\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\/combining-and-or-relational-operators-using-an-sql-query\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Combining AND\/OR Relational Operators Through SQL Query \u2013 JetEngine | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Discover how to combine \u201cAND\u201d and \u201cOR\u201d relational operators through SQL query.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-09T08:52:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field-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=\"11 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\/combining-and-or-relational-operators-using-an-sql-query\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/\",\"name\":\"Combining AND\/OR Relational Operators Through SQL Query \u2013 JetEngine | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2026-03-09T08:52:11+00:00\",\"dateModified\":\"2026-03-09T08:52:14+00:00\",\"description\":\"Discover how to combine \u201cAND\u201d and \u201cOR\u201d relational operators through SQL query.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/#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\":\"Combining AND\/OR Relational Operators Using an SQL Query\"}]},{\"@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":"Combining AND\/OR Relational Operators Through SQL Query \u2013 JetEngine | Crocoblock","description":"Discover how to combine \u201cAND\u201d and \u201cOR\u201d relational operators through SQL query.","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\/combining-and-or-relational-operators-using-an-sql-query\/","og_locale":"en_US","og_type":"article","og_title":"Combining AND\/OR Relational Operators Through SQL Query \u2013 JetEngine | Crocoblock","og_description":"Discover how to combine \u201cAND\u201d and \u201cOR\u201d relational operators through SQL query.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/","og_site_name":"Help Center","article_modified_time":"2026-03-09T08:52:14+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2026\/03\/pool-option-in-the-property-features-meta-field-1024x640.webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/","url":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/","name":"Combining AND\/OR Relational Operators Through SQL Query \u2013 JetEngine | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2026-03-09T08:52:11+00:00","dateModified":"2026-03-09T08:52:14+00:00","description":"Discover how to combine \u201cAND\u201d and \u201cOR\u201d relational operators through SQL query.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/tips-and-tricks\/combining-and-or-relational-operators-using-an-sql-query\/#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":"Combining AND\/OR Relational Operators Using an SQL Query"}]},{"@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\/51242"}],"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\/9"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=51242"}],"wp:term":[{"taxonomy":"tipstricks-tags","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/tipstricks-tags?post=51242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}