Would you like to use WordPress to display your most recent posts? Recent posts are displayed to help users discover new content and spend more time on your site.
You can display a list of your most recent posts in your sidebar, after the conclusion of your post content, inside your post content using a shortcode, in your footer widget area, or anywhere else you want.
In this article, we’ll show you how to use a variety of different methods to display recent posts in WordPress.
Why should you use WordPress’s Recent Posts feature?
If you’ve had a WordPress blog or website for a while, you might notice that some of your older articles are receiving regular traffic from search engines and other sources.
Many of these users will leave after finding the information they were looking for. More than 75% of those who came to your website will never return.
You need to make sure that users spend more time on your website if you want them to keep coming back.
Showing them other recent posts that they should read is one way to accomplish this. Users will spend more time on your website as a result of this.
As users visit more pages, you’ll have more opportunities to persuade them to sign up for your email newsletter or make a purchase.
Let’s take a look at how to quickly display recent posts in WordPress using a variety of methods. To go directly to that process, tap on the quick links:
- Use WordPress’s Recent Posts feature. Block of Gutenberg
- Use the Recent Posts Widget in WordPress.
- Use the Recent Posts Widget With Thumbnails Plugin to display recent posts.
- Using a Shortcode to Show Recent Posts
- In WordPress, you can manually display recent posts.
Method 1: Use the Gutenberg Block for WordPress’s Recent Posts.
A built-in block for displaying your most recent posts is included in the WordPress block (Gutenberg) editor. This is simple to implement in any of your site’s posts or pages.
Simply edit the post where you want recent posts to appear to use this block. To add the ‘Latest Posts’ block to the content area of a post, go to the edit screen and click on it.

You can configure the above block in a number of ways. It shows only the post titles by default, but you can easily change that.
In the right-hand pane, for example, you can turn on and off post content. Next to the title, you can add post content or an excerpt.
You can also change the excerpt length, which is set to 55 words by default but can be changed to any value between 10 and 100 words.

You can choose to show the post date if you want. Just below the title, this will appear.

You can also customize how your posts appear. You can organize them in just about any order besides the default ‘Newest to Oldest,’ and then you can display only the most recent posts from a particular category.
You can also choose how many posts will be displayed from the settings panel. The block displays 5 posts by default, but you can change the number to anywhere between 1 and 100.

You can also choose to see your most recent posts in a column grid rather than a list.

You can also use the grid to input featured images to your posts, change their sizes, and also align them as needed:

On the website, here’s how the completed block looks:

Method 2: Use the Recent Posts Widget in WordPress.
What if you want a list of your most recent posts to appear in your sidebar rather than on a page? WordPress includes a default widget for displaying recent posts in the sidebar or any other widget-ready area.
Go to Appearance » Widgets in your WordPress dashboard and drag the ‘Recent Posts’ widget into your sidebar.

There aren’t too many alternatives in the built-in Recent Posts widget. You can name the widget, choose whether or not to display post dates and specify the number of posts to display.
To save your widget settings, click the ‘Save’ button when you’re finished.
With the title ‘New Posts’ and dates enabled, here’s how the widget looks on the blog:

Method 3: Plugin: Recent Posts Widget With Thumbnails
The above-mentioned built-in widget is quite limited.
What if you want your recent posts to include thumbnails and excerpts? What if you only want posts from a specific category to appear in your sidebar?
The Recent Posts Widget With Thumbnails plugin comes in handy in this situation. It’s free and does a lot more than just thumbnails.
The WordPress Recent Posts Widget With Thumbnails plugin must first be installed and activated.
The ‘Recent Posts With Thumbnails’ widget should be visible on the Appearance » Widgets page.

It must be placed in your sidebar or another widget-enabled area.

There are many options for the Recent Posts With Thumbnails widget. It allows you complete control over how your WordPress site’s recent posts are displayed.
You can also display excerpts, posts from specific categories, sticky posts, or random posts, among other options.
When you’re finished, remember to save your changes by clicking the save button. You can now view your recent posts as thumbnails on your website.

Method 4: Using a Shortcode to Show Recent Posts
Using the ‘Latest Posts’ block in WordPress posts and pages is by far the simplest way to display recent posts. You can use shortcodes instead of Gutenberg if you disable Gutenberg and keep the Classic editor.
To begin, download and install the Display Posts plugin. It works right out of the box, and there are no settings to mess with.
Simply edit a post or page where you want your recent posts to appear. Then use the [display-posts] shortcode. The shortcode can be used with a wide range of parameters provided by the plugin.
Here are some examples of what this plugin can do.
Showcase three recent posts, each with a thumbnail and excerpt:
- [display-posts posts per page=”3″ image size=”thumbnail” include excerpt=”true”] [display-posts posts per page=”3″ image size=”thumbnail” include excerpt=”true”] [display-posts posts_
Rather than posts, show recent pages:
- posts per page=”3″ post type=”page”] [display-posts posts per page=”3″]
Instead of date, change the order to title:
- post per page=”3″ orderby=”title”] [display-posts posts per page=”3″]
Recent pages are displayed beneath a specific parent page:
- [display-posts posts per page=”3″ post type=”page” post parent=”5″] [display-posts posts per page=”3″ post type=”page” post parent=”5″] [display-posts posts
Additional styling can also be added. For example, your featured images might be aligned to the left. You can find instructions on how to do so on the plugin’s website.
Using those instructions, this is how our list of recent posts appeared:

Visit the plugin’s documentation for a complete list of parameters.
These shortcodes can also be used within a text widget. To begin, add this code to your theme’s functions.php file or a site-specific plugin to enable shortcodes in your text widgets.
- ‘widget text’,’do shortcode’); add filter(‘widget text’,’do shortcode’);
Method 5: Manually show recent posts in WordPress
Advanced WordPress users may want to include recent posts in their theme files directly. Of course, you should do this with a child theme so that your changes aren’t lost when your theme is updated.
Before you make any changes to your theme files, make a backup.
The built-in WP Query class is the easiest way to manually display recent posts. Simply paste this code where you want the most recent posts to appear.
- <ul>
- <?php
- // Define our WP Query Parameters
$the_query
= new
WP_Query( 'posts_per_page=5'
); ?>
- <?php
- // Start our WP Query
while
($the_query
-> have_posts()) : $the_query
-> the_post();
- // Display the Post Title with Hyperlink
- ?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
- <li><?php
- // Display the Post Excerpt
the_excerpt(__('(more…)')); ?></li>
- <?php
- // Repeat the process and reset once it hits the limit
endwhile;
- wp_reset_postdata();
- ?>
- </ul>
This code displays the titles and excerpts of the five most recent posts. The WP Query class has a plethora of parameters that you can use to customize it in any way you want. Please see the WordPress developer documentation for more details.
We hope this article has taught you how to use WordPress to display recent posts. You might also like our comparison of the best drag and drop WordPress page builder plugins.
If you liked this post, please find and follow us on Instagram, Twitter and Facebook.