How to order by Publishing date?

[ad_1]

How should I display the content by publishing date, starting from the oldest to newest.

`<?php`

`// Define our WP Query Parameters`

`$args = array( ‘post_type’ => ‘Plan’, ‘posts_per_page’ => 6 );`

`$loop = new WP_Query( $args );`

`while ( $loop->have_posts() ) : $loop->the_post();`

`?>`

&#x200B;

`<div class=”postBlog”>`

`<a href=”<?php the\_permalink() ?>” class=”simpleText”><?php the\_title(); ?></a>`

`<p class=”text-gray-600 mt-1″><span class=”font-bold text-black text-3xl”>`

`<?php echo get\_field(‘pricing’);`
`?>`

`</p>`

`<p class=”text-gray-600 mt-2″>`

`<?php $content = get\_the\_content(); echo wp\_trim\_words( get\_the\_content(), 25, ‘…’ );?>`

`</p>`

[ad_2]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer