Usually, the posts are arranged based on the publication date. Also, you might need to change the descending order, when the most recent post is shown first, to ascending, when the first posts are shown ahead of the ones published later.
In case you’re working with Elementor and use JetElements Posts widget, JetBlog widgets or JetEngine Listing Grid, you can easily use any posts order you need, and query them by publishing date as well as use any custom query.
Changing the posts order for JetElements and JetBlog widgets
Step 1 — Firstly, open your posts page template with Elementor page builder, find the Posts widget. You should drag and drop it to the page’s canvas. It will show all your existing posts in the default order.
Step 2 — After that, let’s navigate to the WP Query Generator tool. Here open General tab and specify the following conditions for your new query:
- post type: post;
- order: ACS (stands for ascending order);
- order by: date.
Step 3 — Afterwards, copy the generated query to clipboard and return to Elementor editor. Start editing the Posts widget.
Open Query & Controls block and here enable Use custom query option.
In the field below you should paste the code you’ve previously copied.
Changing the posts order for JetEngine Listing Grid widget
In case you’ve got a listing and have specified it in the Listing dropdown for the Listing Grid widget, you also can see all the posts arranged in the default order.
Let’s make the Listing Grid query the post listings by date and set an ascending order for it.
Step 1 — Open the Posts Query tab and here click Add Item button to add a new query condition.
Step 2 —Select the Order & Offset type in the query.
Step 3 — Set ASC in Order dropdown. Set Date in the Order by dropdown.
Well, that’s all for now.
Now you know how to arrange the posts using the date query!