{"id":5058,"date":"2019-01-30T09:12:13","date_gmt":"2019-01-30T09:12:13","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=5058"},"modified":"2023-01-12T10:49:19","modified_gmt":"2023-01-12T10:49:19","slug":"how-to-query-posts-by-date-using-ascending-posts-order","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/","title":{"rendered":"How to Order Posts by Date in the Posts Widget"},"content":{"rendered":"\n<p>WP Query Generator tool allows you to create any type of custom query really easily. In this tutorial, we will show you how it works on the example of the query that sorts the posts according to the publication date.<\/p>\n\n\n\n<p> An order based on the publication date is the most common for posts. By default, it is the descending order, when the most recent post is shown first. You might need to change it to ascending order when the latest posts are shown last.<\/p>\n\n\n\n<p>Let&#8217;s take a look at how the order of the posts could be changed by inserting a custom query.<\/p>\n\n\n\n<p class=\"style-title-numecal\"><b><span>1<\/span> Step<\/b> <strong>\u2014 Generate the query<\/strong><\/p>\n\n\n\n<p>Open the page where you have placed the posts grid with Elementor page builder, find the <strong>Posts<\/strong> widget, and click the &#8220;<strong>Edit Posts<\/strong>&#8221; button. If you haven&#8217;t yet created the posts grid or slider &#8211; check out <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/how-to-create-a-posts-grid-using-jetelements-posts-widget\/\">posts grid<\/a> or <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/how-to-create-a-posts-carousel-using-jetelements-posts-widget\/\">posts carousel creation<\/a> tutorial.<\/p>\n\n\n\n<p>After that, let\u2019s navigate to the <a rel=\"noopener noreferrer\" href=\"https:\/\/crocoblock.com\/freemium\/tools\/wp-query-generator\/\" target=\"_blank\">WP Query Generator<\/a> tool. Open General tab and specify the following conditions for your new query:<\/p>\n\n\n\n<ul>\n<li>Post type: post;<\/li>\n\n\n\n<li>Post status: Publish<\/li>\n\n\n\n<li>Order: ACS (stands for ascending order);<\/li>\n\n\n\n<li>Order by: date.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/query-generator.png\" alt=\"WP Query Generator\" class=\"wp-image-20246\"\/><\/div>\n\n\n\n<p>Copy the generated query to clipboard and return to Elementor editor. Open <strong><em>Content &gt; Genera<\/em>l<\/strong>&nbsp;and enable <strong>Use Custom Query <\/strong>option. Paste the generated code to the <strong>Set custom query<\/strong> text field.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/custom-query.png\" alt=\"Set custom query\" class=\"wp-image-20244\"\/><\/div>\n\n\n\n<p>Well, that\u2019s all. Now you know how to generate and apply custom queries to the posts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will be helpful if you need to display your posts in a certain order by date in the JetElements posts widget.<\/p>\n","protected":false},"author":11,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[517],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JetElements: How to Generate Custom Query | Crocoblock<\/title>\n<meta name=\"description\" content=\"Study how to display your posts in chronological order! Use JetBlog in a couple with JetElements and JetEngine plugins from Crocoblock.\" \/>\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\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JetElements: How to Generate Custom Query | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Study how to display your posts in chronological order! Use JetBlog in a couple with JetElements and JetEngine plugins from Crocoblock.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-12T10:49:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/query-generator.png\" \/>\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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/\",\"name\":\"JetElements: How to Generate Custom Query | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2019-01-30T09:12:13+00:00\",\"dateModified\":\"2023-01-12T10:49:19+00:00\",\"description\":\"Study how to display your posts in chronological order! Use JetBlog in a couple with JetElements and JetEngine plugins from Crocoblock.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/#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 Order Posts by Date in the Posts Widget\"}]},{\"@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":"JetElements: How to Generate Custom Query | Crocoblock","description":"Study how to display your posts in chronological order! Use JetBlog in a couple with JetElements and JetEngine plugins from Crocoblock.","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\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/","og_locale":"en_US","og_type":"article","og_title":"JetElements: How to Generate Custom Query | Crocoblock","og_description":"Study how to display your posts in chronological order! Use JetBlog in a couple with JetElements and JetEngine plugins from Crocoblock.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/","og_site_name":"Help Center","article_modified_time":"2023-01-12T10:49:19+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2019\/01\/query-generator.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/","name":"JetElements: How to Generate Custom Query | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2019-01-30T09:12:13+00:00","dateModified":"2023-01-12T10:49:19+00:00","description":"Study how to display your posts in chronological order! Use JetBlog in a couple with JetElements and JetEngine plugins from Crocoblock.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetelements\/how-to-query-posts-by-date-using-ascending-posts-order\/#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 Order Posts by Date in the Posts Widget"}]},{"@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\/5058"}],"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\/11"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=5058"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=5058"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=5058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}