{"id":44808,"date":"2024-06-21T09:51:39","date_gmt":"2024-06-21T09:51:39","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=44808"},"modified":"2024-06-21T10:36:45","modified_gmt":"2024-06-21T10:36:45","slug":"using-components-in-query-loop-or-listing","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/","title":{"rendered":"How to Use Components in Query Loop or Listing Grid"},"content":{"rendered":"\n<p>The <strong><a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/components-overview\/\">Components<\/a> <\/strong>feature of the <em>JetEngine <\/em>plugin allows you to create a custom widget\/element\/block that can be reused on different pages or templates on your WordPress website. You can also add components to the<em> JetEngine<\/em> <strong>Listing Grid<\/strong> <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/showcasing-custom-posts-via-listing-grid-with-bricks\/\" target=\"_blank\" rel=\"noreferrer noopener\">element<\/a>\/<a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/listing-grid-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">widget<\/a>\/<a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/listing-grid-block-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">block<\/a> or <a href=\"https:\/\/academy.bricksbuilder.io\/article\/query-loop\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"><strong>Query Loop<\/strong><\/a> of the <em>Bricks <\/em>theme.<\/p>\n\n\n\n<p>In this tutorial, we will create a component with user information and place it on the <strong>Listing Grid<\/strong> or <strong>Query Loop<\/strong> with posts. It can be default WordPress posts or posts from a <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/custom-post-type-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Custom Post Type<\/strong><\/a>. Setting the component <strong><a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/making-your-component-dynamic\/\">Context<\/a><\/strong> will display the author info for every post.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-a-new-component-for-cpt\">Create a New Component for CPT<\/h2>\n\n\n\n<p>Go to the <strong><em>WordPress Dashboard &gt; JetEngine &gt; Listings\/Components <\/em><\/strong>tab and hit the \u201c<strong>Add New Component<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component.webp\" alt=\"add new component\" class=\"wp-image-44789\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>In the <strong>Setup Component <\/strong>pop-up, enter the <strong>Component name <\/strong>(e.g., \u201cUser info\u201d) and select the <strong>Component view<\/strong> (\u201cElementor,\u201d \u201cBricks,\u201d \u201cTimber\/Twig,\u201d or \u201cBlocks (Gutenberg)\u201d).<\/p>\n\n\n\n<p>In our example, we select the \u201cBricks\u201d option.<\/p>\n\n\n\n<p>Then, press the \u201c<strong>Create Component<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-setup-and-creation.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-setup-and-creation.webp\" alt=\"component setup and creation\" class=\"wp-image-44790\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-setup-and-creation.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-setup-and-creation-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-setup-and-creation-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-setup-and-creation-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-setup-and-creation-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-setup-and-creation-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>Check this tutorial to learn <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/creating-user-account-page\/#how-to-display-user-information\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>how to add meta fields to user and display user information<\/strong><\/a>.<\/p>\n\n\n\n<p>To display some user data, we use <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/dynamic-widgets-and-blocks\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Dynamic elements<\/strong><\/a>.<\/p>\n\n\n\n<p>On the editing page, we place three <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/dynamic-field-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Dynamic Field<\/strong><\/a> elements. For them, we set the \u201cPost\/Term\/User\/Object Data\u201d <strong>Source<\/strong> and \u201cLogin,\u201d \u201cID,\u201d and \u201cEmail\u201d <strong>Object fields<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/dynamic-fields-display-user-info-in-bricks-1.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/dynamic-fields-display-user-info-in-bricks-1.webp\" alt=\"dynamic fields display user info in bricks\" class=\"wp-image-44818\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/dynamic-fields-display-user-info-in-bricks-1.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/dynamic-fields-display-user-info-in-bricks-1-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/dynamic-fields-display-user-info-in-bricks-1-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/dynamic-fields-display-user-info-in-bricks-1-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/dynamic-fields-display-user-info-in-bricks-1-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/dynamic-fields-display-user-info-in-bricks-1-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>Also, we enable the <strong>Customize field output<\/strong> option for three <strong>Dynamic Fields<\/strong> and set the <strong>Field format <\/strong>(e.g., \u201cEmail: %s\u201d).<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/customize-field-output-in-bricks-1.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/customize-field-output-in-bricks-1.webp\" alt=\"customize field output in bricks\" class=\"wp-image-44817\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/customize-field-output-in-bricks-1.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/customize-field-output-in-bricks-1-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/customize-field-output-in-bricks-1-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/customize-field-output-in-bricks-1-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/customize-field-output-in-bricks-1-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/customize-field-output-in-bricks-1-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>To learn how to add the&nbsp;<strong>Content<\/strong>&nbsp;and&nbsp;<strong>Style Controls<\/strong>&nbsp;to the component, proceed to the&nbsp;<strong><a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/components-overview\/#bricks\" target=\"_blank\" rel=\"noreferrer noopener\">Components Overview<\/a><\/strong>.<\/p>\n\n\n\n<p>When you are done, save the component settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"component-in-query-loop\">Component in Query Loop<\/h2>\n\n\n\n<p>To learn about the <a href=\"https:\/\/academy.bricksbuilder.io\/article\/query-loop\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"><strong>Query Loop<\/strong><\/a><strong> <\/strong>feature of the Bricks theme, proceed to this article.<\/p>\n\n\n\n<p>Go to the <strong><em>WordPress Dashboard &gt; Pages<\/em><\/strong> tab and create a new page or edit the existing one in Bricks editor.<\/p>\n\n\n\n<p>Here, press the \u201c<strong>+<\/strong>\u201d icon to add a new section and click on the <strong>Container<\/strong> element in the <strong>Structure<\/strong> tab on the right.<\/p>\n\n\n\n<p>In the <strong>CONTENT <\/strong>settings tab of the <strong>Container<\/strong>, enable the <strong>Use query loop <\/strong>toggle and hit the \u201c<strong>infinity<\/strong>\u201d icon.<\/p>\n\n\n\n<p>In the appeared pop-up, you can alter the query settings. For example, we adjust the <strong>Type<\/strong> to &#8220;Posts&#8221; and select the &#8220;Posts&#8221; option as the <strong>Post type<\/strong>, but you can set other options if you want to use another source for posts.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-settings.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-settings.webp\" alt=\"query loop settings\" class=\"wp-image-44823\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-settings.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-settings-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-settings-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-settings-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-settings-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-settings-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>To close the pop-up, click on the area beyond it and fill the <strong>Container <\/strong>with the <strong>Query Loop<\/strong> with the needed content. For example, you can use <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/dynamic-widgets-and-blocks\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Dynamic Elements<\/strong><\/a>.<\/p>\n\n\n\n<p>For instance, we place such elements:<\/p>\n\n\n\n<ul>\n<li><strong>Dynamic Field <\/strong>with the \u201cPost\/Term\/User\/Object Data\u201d <strong>Source <\/strong>and \u201cTitle\u201d <strong>Object field<\/strong>;<\/li>\n\n\n\n<li><strong>Dynamic Field <\/strong>with the \u201cPost\/Term\/User\/Object Data\u201d <strong>Source <\/strong>and \u201cContent\u201d <strong>Object field<\/strong>;<\/li>\n\n\n\n<li><strong>Dynamic Image <\/strong>with the \u201cPost thumbnail\u201d <strong>Source<\/strong>.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-with-dynamic-elements.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-with-dynamic-elements.webp\" alt=\"query loop with dynamic elements\" class=\"wp-image-44824\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-with-dynamic-elements.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-with-dynamic-elements-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-with-dynamic-elements-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-with-dynamic-elements-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-with-dynamic-elements-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/query-loop-with-dynamic-elements-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>In the left panel, search the recently created component by its name and place it on the editing page. In our case, it\u2019s the <strong>User info<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-element-in-bricks-builder.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-element-in-bricks-builder.webp\" alt=\"component element in bricks builder\" class=\"wp-image-44810\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-element-in-bricks-builder.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-element-in-bricks-builder-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-element-in-bricks-builder-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-element-in-bricks-builder-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-element-in-bricks-builder-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-element-in-bricks-builder-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>In the <strong>G<\/strong><strong>ENERAL<\/strong><strong> <\/strong>settings tab, choose the \u201cCurrent Post Author\u201d option for the <strong>Component Context <\/strong>field.&nbsp;<\/p>\n\n\n\n<p>Be aware the first item in the <strong>Query Loop <\/strong>will show the current user instead of the post author, but it will work as intended on the front end.<\/p>\n\n\n\n<p>Now, save the page settings.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop.webp\" alt=\"component in query loop\" class=\"wp-image-44813\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>Open the page on the front end and check the result.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-on-the-front-end.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-on-the-front-end.webp\" alt=\"component in query loop on the front end\" class=\"wp-image-44812\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-on-the-front-end.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-on-the-front-end-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-on-the-front-end-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-on-the-front-end-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-on-the-front-end-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-query-loop-on-the-front-end-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"component-in-listing-grid\">Component in Listing Grid<\/h2>\n\n\n\n<p>Go to the <strong><em>WordPress Dashboard &gt; JetEngine &gt; Listings\/Components <\/em><\/strong>tab and hit the \u201c<strong>Add New Listing Item<\/strong>\u201d button.<\/p>\n\n\n\n<p>In the <strong>Setup Listing Item <\/strong>pop-up, we pick the \u201cPost\u201d <strong>Listing source<\/strong> and \u201cPosts\u201d in the <strong>From post type <\/strong>dropdown menu, enter the <strong>Listing item name<\/strong>, and select the <strong>Listing view<\/strong> (e.g., \u201cBricks\u201d).<\/p>\n\n\n\n<p>Then, push the \u201c<strong>Create Listing Item<\/strong>\u201d button.<\/p>\n\n\n\n<p>Learn more about the <strong>Listing template<\/strong> in <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/listing-template-in-elementor-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">Elementor<\/a>, <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-create-a-listing-template-in-gutenberg\/\" target=\"_blank\" rel=\"noreferrer noopener\">Gutenberg<\/a>, <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/how-to-create-listing-items-with-bricks\/\" target=\"_blank\" rel=\"noreferrer noopener\">Bricks<\/a>, and <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/creating-listing-template-using-timber-twig-view\/\" target=\"_blank\" rel=\"noreferrer noopener\">Timber\/Twig<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/creating-listing-template-for-posts.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/creating-listing-template-for-posts.webp\" alt=\"creating listing template for posts\" class=\"wp-image-44816\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/creating-listing-template-for-posts.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/creating-listing-template-for-posts-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/creating-listing-template-for-posts-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/creating-listing-template-for-posts-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/creating-listing-template-for-posts-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/creating-listing-template-for-posts-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>On the editing page, we place such elements:<\/p>\n\n\n\n<ul>\n<li><strong>Dynamic Field <\/strong>with the \u201cPost\/Term\/User\/Object Data\u201d <strong>Source <\/strong>and \u201cTitle\u201d <strong>Object field<\/strong>;<\/li>\n\n\n\n<li><strong>Dynamic Field <\/strong>with the \u201cPost\/Term\/User\/Object Data\u201d <strong>Source <\/strong>and \u201cContent\u201d <strong>Object field<\/strong>;<\/li>\n\n\n\n<li><strong>Dynamic Image <\/strong>with the \u201cPost thumbnail\u201d <strong>Source<\/strong>.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-item-with-post-info.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-item-with-post-info.webp\" alt=\"listing item with post info\" class=\"wp-image-44822\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-item-with-post-info.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-item-with-post-info-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-item-with-post-info-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-item-with-post-info-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-item-with-post-info-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-item-with-post-info-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>In the left panel, search the recently created component by its name and place it on the editing page. In our case, it\u2019s the <strong>User info<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-bricks-editor.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-bricks-editor.webp\" alt=\"component in bricks editor\" class=\"wp-image-44811\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-bricks-editor.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-bricks-editor-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-bricks-editor-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-bricks-editor-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-bricks-editor-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-in-bricks-editor-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>Open the <strong>General <\/strong>settings tab and select the \u201cCurrent Post Author\u201d option for the <strong>Component Context <\/strong>field.&nbsp;<\/p>\n\n\n\n<p>Note that the component will still show the current user information \u2014 the context will work as intended on the page with the <strong>Listing Grid<\/strong>.<\/p>\n\n\n\n<p>Now, save the listing template settings.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-context-option.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-context-option.webp\" alt=\"component context option\" class=\"wp-image-44809\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-context-option.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-context-option-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-context-option-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-context-option-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-context-option-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/component-context-option-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>Proceed to the <strong><em>WordPress Dashboard &gt; Pages <\/em><\/strong>tab and create a new page or edit the existing one.<\/p>\n\n\n\n<p>For example, we hit the \u201c<strong>Add New Page<\/strong>\u201d button, enter the page title, and hit the \u201c<strong>EDIT WITH BRICKS<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/edit-with-bricks.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/edit-with-bricks.webp\" alt=\"edit with bricks\" class=\"wp-image-44820\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/edit-with-bricks.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/edit-with-bricks-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/edit-with-bricks-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/edit-with-bricks-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/edit-with-bricks-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/edit-with-bricks-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>Drag-n-drop the <strong>Listing Grid <\/strong><a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/showcasing-custom-posts-via-listing-grid-with-bricks\/\" target=\"_blank\" rel=\"noreferrer noopener\">element<\/a>, <a href=\"https:\/\/crocoblock.com\/knowledge-base\/features\/listing-grid-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">widget<\/a>, or <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/listing-grid-block-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">block<\/a> (depending on the builder you use) to the editing page and set the recently created <strong>Listing<\/strong>. Customize the element and page. Then, save the changes.<\/p>\n\n\n\n<div class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-grid-in-bricks-editor.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1824\" height=\"1100\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-grid-in-bricks-editor.webp\" alt=\"listing grid in bricks editor\" class=\"wp-image-44821\" style=\"width:840px;height:auto\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-grid-in-bricks-editor.webp 1824w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-grid-in-bricks-editor-300x181.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-grid-in-bricks-editor-1024x618.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-grid-in-bricks-editor-768x463.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-grid-in-bricks-editor-1536x926.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/listing-grid-in-bricks-editor-600x362.webp 600w\" sizes=\"(max-width: 1824px) 100vw, 1824px\" \/><\/a><\/div>\n\n\n\n<p>That\u2019s all. Now you know how to use components created with the <em>JetEngine<\/em> plugin in the <strong>Query Loop<\/strong> of the <em>Bricks<\/em> theme or <strong>Listing Grid<\/strong> on your WordPress website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial explains how to use components created with the JetEngine plugin in the Query Loop of the Bricks theme or Listing Grid on your WordPress website.<\/p>\n","protected":false},"author":8,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[568],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use Components in Query Loop or Listing Grid \u2014 JetEngine | Crocoblock<\/title>\n<meta name=\"description\" content=\"Learn how to use components created with the JetEngine plugin in the Query Loop of the Bricks theme or Listing Grid 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\/using-components-in-query-loop-or-listing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Components in Query Loop or Listing Grid \u2014 JetEngine | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Learn how to use components created with the JetEngine plugin in the Query Loop of the Bricks theme or Listing Grid on your WordPress website.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-21T10:36:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component.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=\"7 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\/using-components-in-query-loop-or-listing\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/\",\"name\":\"How to Use Components in Query Loop or Listing Grid \u2014 JetEngine | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2024-06-21T09:51:39+00:00\",\"dateModified\":\"2024-06-21T10:36:45+00:00\",\"description\":\"Learn how to use components created with the JetEngine plugin in the Query Loop of the Bricks theme or Listing Grid on your WordPress website.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/#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 Use Components in Query Loop or Listing Grid\"}]},{\"@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 Use Components in Query Loop or Listing Grid \u2014 JetEngine | Crocoblock","description":"Learn how to use components created with the JetEngine plugin in the Query Loop of the Bricks theme or Listing Grid 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\/using-components-in-query-loop-or-listing\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Components in Query Loop or Listing Grid \u2014 JetEngine | Crocoblock","og_description":"Learn how to use components created with the JetEngine plugin in the Query Loop of the Bricks theme or Listing Grid on your WordPress website.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/","og_site_name":"Help Center","article_modified_time":"2024-06-21T10:36:45+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/add-new-component.webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/","name":"How to Use Components in Query Loop or Listing Grid \u2014 JetEngine | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2024-06-21T09:51:39+00:00","dateModified":"2024-06-21T10:36:45+00:00","description":"Learn how to use components created with the JetEngine plugin in the Query Loop of the Bricks theme or Listing Grid on your WordPress website.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/using-components-in-query-loop-or-listing\/#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 Use Components in Query Loop or Listing Grid"}]},{"@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\/44808"}],"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\/8"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=44808"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=44808"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=44808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}