Like WPBeginner, many popular blogs display a list of the most recent posts. That’s because showing recent posts is a great way to keep visitors engaged and coming back for more.
When people see your latest and greatest content, they’re more likely to click, read, and spend time exploring your site. It keeps your website feeling fresh and exciting.
The best thing is, that you can add these recent post lists almost anywhere on your WordPress website, such as in your sidebar, at the end of an article, or even in your footer.
In this article, we’ll show you some easy ways to add a recent post list to your site, no matter where you want it to appear. Get ready to keep your visitors hooked on your amazing content.
Why Add Recent Posts in WordPress?
If you have been running a WordPress blog or website for a long time, then you may have some older articles getting regular traffic from search engines and other sources.
Many of the visitors will check out the information they were looking for and leave. More than 75% of those visitors will never see your website again.
To keep users coming back to your website, you need to ensure that they spend more time on your website.
One way to do this is by showing them other recent posts that they should see. This helps users uncover more content on your website, which leads to them spending more time on your website.
As users view more pages, this gives you time to convince them to sign up for your email newsletter or make a purchase.
That being said, let’s take a look at how to easily display recent posts in WordPress using multiple methods. You can click on the quick links below to jump straight to different methods:
Video Tutorial
If you’d prefer written instructions, then just keep reading.
Method 1: Use WordPress’s Latest Posts Gutenberg Block
The WordPress block (Gutenberg) editor has a built-in block for displaying your latest posts. You can easily add this to any of the posts or pages on your site.
To use this block, simply edit the post where you want to display recent posts. On the post edit screen, you need to add the ‘Latest Posts’ block to the content area.
There are lots of different ways you can configure this block. By default, it just shows the post titles, but you can easily customize it.
For example, you can toggle the post content on and off in the right-hand pane. This lets you choose to add post content or excerpt next to the title.
You can also customize the excerpt length, which defaults to 55 words, but you can pick any value between 10 and 100 words.
If you want, you can also display the post date and post author.
Simply enable the ‘Display post date’ and ‘Display author name’ options under Post Meta Settings.
You can also choose exactly how your posts will be displayed. You can order them differently from the default ‘Newest to Oldest’, and you can show only the latest posts from a specific category.
From the settings panel, you can also choose how many posts will be displayed. By default, the block shows 5 posts, but you can display anywhere between 1 and 100 posts.
You also have the option to display your recent posts in a column grid rather than a list.
Simply select the ‘Grid view’ option on the toolbar.
You can customize the grid using the settings on the right of the screen.
For example, you can show featured images for your posts, resize the images, and align them accordingly.
Once you are finished, you can preview the post to view it on your website.
Here’s how the finished block looks live on our test site.
Method 2: Use the WordPress Recent Posts Widget Block
What if you want to show a list of your latest posts in your sidebar instead of on a page? WordPress comes with a built-in default widget to display recent posts in your site’s sidebar or any widget-ready area.
In your WordPress dashboard, go to Appearance » Widgets and add the ‘Latest Posts’ widget block to your sidebar.
You can then customize the appearance of your recent posts in the sidebar.
For instance, WordPress lets you show post content, display post author and date, enable featured images, and sort your latest posts.
Once you are done, click on the ‘Update’ button to store your widget settings.
Here’s the widget live on the blog, with the title ‘New Posts’ and dates enabled:
Method 3: Use the Recent Posts Widget With Thumbnails Plugin
The built-in widget we mentioned above is quite limited.
What if you want to display thumbnails and excerpts with your recent posts? What if you’d like to only show posts from a specific category in your sidebar?
Well, that’s when the Recent Posts Widget With Thumbnails plugin comes in handy. It does a lot more than just thumbnails, and it’s free.
First, you’ll need to install and activate the WordPress Recent Posts Widget With Thumbnails plugin.
Next, go to the Appearance » Widgets page and then add the ‘Recent Posts With Thumbnails’ widget block.
The Recent Posts With Thumbnails widget comes with a lot of options. It gives you full control over how you want to display recent posts on your WordPress site.
You can also show excerpts, show posts from specific categories, ignore sticky posts, choose the number of posts to show, display authors, and more.
Once you are done, don’t forget to click on the ‘Update’ button to store your settings.
You can now visit your website to see your recent posts with thumbnails.
Method 4: Display Recent Posts Using a Shortcode
Using the ‘Latest Posts’ block is definitely the easiest way to display recent posts in WordPress posts and pages. However, if you choose to disable Gutenberg and keep the Classic editor, then you can use shortcodes instead.
First, install and activate the Relevant plugin. If you need help, then please see our guide on how to install a WordPress plugin.
It’s one of the most popular post plugins for WordPress. You get multiple options to customize the appearance of your latest posts, like editing the title, the number of posts, selecting whether you’d like to display a featured image, excerpt, post date, and more.
Next, simply edit a post or page where you want to display your recent posts and then use the shortcode [bws_latest_posts]
.
Here’s how our list of recent posts looked, using those instructions:
Method 5: Display Recent Posts Manually in WordPress
More advanced WordPress users may want to add recent posts directly to their WordPress theme files. Of course, you should use a child theme for this so that when you update your theme, you don’t lose your changes.
It’s always a good idea to create a backup before you edit your theme files. If anything does go wrong, you might want to take a look at our list of the most common WordPress errors and how to fix them.
The easiest way to manually display recent posts is to use the built-in WP_Query class. Simply add this code where you want to display the recent posts:
<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 five most recent posts with their titles and excerpts. The WP_Query class has tons of parameters that allow you to customize it in any way that you like. For more information, please refer to the WordPress developer documentation.
Expert Guides on Recommending Posts in WordPress
We hope that this article helped you learn how to display recent posts in WordPress. You might also be interested in some other articles related to promoting content to your readers:
- How to Display Popular Posts by Views in WordPress
- Best Popular Posts Plugins for WordPress (Compared)
- How to Display Related Posts in WordPress (Step by Step)
- Best Related Posts Plugins for WordPress (Compared)
- Proven Methods to Promote Old Posts in WordPress
- How to Highlight New Posts for Returning Visitors in WordPress
- How to Display Random Posts in WordPress (Easy Tutorial)
- How to Display Most Commented Posts in WordPress
- How to Display Recent Posts From a Specific Category in WordPress
- How to Increase Your Blog Traffic – The Easy Way
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Jiří Vaněk
I would like to post these recents at the end of each article. But there are already more than 1000 of them. It doesn’t make sense to do it manually. Is it possible to take the php code, insert it into WPCode and use the embed code at the end of each article? Will it work like this?
WPBeginner Support
If you wanted to you could certainly do that
Admin
Mike
Is any way to use shortcode like [bws_latest_posts tag=”something”]?
Thanks!
WPBeginner Support
There are some options in the plugin settings to limit the categories but at the moment the plugin does not have a modifier like that for the shortcode.
Admin
Bernie
Thanks for lots of great advice!
I have been spending days so far, to solve a challange here:
Im using the Twenty Twenty-Three template.
Using Gutenberg.
Created a 2nd column where i would like to place a list of the latest posts by CURRENT author, incl. thumbnail, except etc.
I can only find this solution in plugins with widgets, and as far as I understand this Gutenberg thing, widgets cant be used here.
Any idea how to solve this?
WPBeginner Support
If you are manually adding it to each post, there is a latest posts block that gives the option to limit the posts listed by author and a few other sorting options that you can use as well!
Admin
Matt
How to enable a link to more pages/posts? The widget only says up to 100, but how to paginate etc if there are 1000 or more?
WPBeginner Support
We do not recommend having more than 100 posts in a widget due to that being difficult for most users to read through for its space. If you are displaying that many posts we would recommend displaying it on a page or something similar.
Admin
Jack Yasgar
When I use the WordPress Latest Posts Gutenberg Block, it displays all the texts of the posts. In the preview when I add it to the page, it looks fine, with the “Read More”, but when you actually preview or publish the page, all the text is displayed and it looks terrible. This is on Version 5.9.1. Any suggestions or is it just a bug?
WPBeginner Support
You would want to check the settings for your widget as that should be where you can customize how your widget is displayed. If it is not following those settings then you would likely want to reach out to the support for your theme in case it is overriding your settings.
Admin
Dileepa
Is it possible to display posts that are specific for a certain ‘Category’ as a Recent Post?
WPBeginner Support
The simplest method would be to add a category to your menu and that would link to a category page that would list your most recent posts in that category.
Admin
Sean
I’m using ‘Display Posts’ and love it. I run a gardening website so if a post is called ‘How to Grow Beetroot’, is there any way by using Display Posts that the only part of the title that is displayed is ‘Beetroot’?
Thank you
WPBeginner Support
The plugin by default does not change your post titles. You would want to reach out to the plugin’s support if you wanted that functionality
Admin
Lucy
I can’t seem to get the Read More to appear in the published version. It appears in the editor but when I publish, it is gone. I’m using Astra theme.
WPBeginner Support
You would want to check for if you need to enable excerpts with your specific theme for it to display how you are wanting.
Admin
Hamza
Hi, When I click on the “Read more..” on a post on Recent Posts, it does not to go to that specific post page rather it loads the home page.
Appreciate if you can help on this.
Thanks
WPBeginner Support
It would depend on what method you are using for possible issues and solutions.
Admin
Julian
This was really helpful thanks. Just a correction to note, in the last code snippet the comments are using // but they’re not actually in the php so they will show up if you use this code as-is.
WPBeginner Support
Thank you for pointing that out, we’ll update the code to fix this
Admin
Michael Robinson
Hi, I”m still lost. My posts still don’t show up on my homepage, I have content blocks set up on my homepage and using Guterberg to set up the content. When I publish the post. It does not show up on my Homepage feature posts grid. There is something I am not getting.
WPBeginner Support
You may want to clear any caching on your site to ensure your caching is not preventing the changes from being seen.
Admin
Venkat
My blog shows bulleted post, how do I stop it from being an unordered list, and make it in grid?
WPBeginner Support
You can use the new latest post block and use the built-in grid option in the block’s options
Admin
Mohammed
Hello Friends,
My query is what is the short code to display all the content of a post?!
WPBeginner Support
It would depend on why you want to do that. If you want the entire content of a post to be visible to a user it would normally be best to link to the post you want to show so your users can read from the source.
Admin
Miracle Lawrence
My blog shows bulleted post, how do I stop it from being an unordered list, and make it in grid?
WPBeginner Support
For making your posts appear in a grid, you would want to take a look at our article here:
https://www.wpbeginner.com/plugins/how-to-display-your-wordpress-posts-in-a-grid-layout/
Admin
Sarah
Hello – I am trying to figure out why the Recent Posts widget (the basic one) is excluding my most recent post. I would like that to show. Is there custom CSS I could add to make it show? or can I edit the code?
WPBeginner Support
The most common reason for something like that would be if you have caching or similar on your site that is preventing the widget from updating, you would first want to clear your cache. We have an article on how you’re able to do so here:
https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/
Admin
WPBeginner Support
It would depend on how you want it styled but you could create a tabber widget for what I believe you’re wanting:
https://www.wpbeginner.com/wp-tutorials/how-to-add-jquery-tabber-widget-in-wordpress/
Admin
Ata
Thank you for the useful post.
I have a question. What if I want to display recent posts on front page categories wise. Like recent posts should appear on the front page under a particular category.
Is it possible?
Arif
Awesome as always. When I found wpbeginner is sharing on this topic I was like . But my question is placing post widget on homepage is beneficial or it’s just easy to navigate? Can it help with seo perspective? Can it help with the ranking? Your response highly appreciated
WPBeginner Support
Making your site easier to navigate can improve your SEO as well as making it easier for your users to continue navigating through your site.
Admin
Rajiv Dave
Thanks for recent post articles. I was trying so much but now its so easy to work just adding adding it. Thanks for sharing
WPBeginner Support
Glad our article was helpful
Admin
aditya tomar
thank you so much. this helped me a lot. thank you thank you :).
WPBeginner Support
You’re welcome
Admin
Trang
When I tried to edit the page that’s supposed to display blog posts, the editor disappears wit this notice: “You are currently editing the page that shows your latest posts”. Does anyone have this same problem as me?
WPBeginner Support
The Blog page is automatically generated by your theme so you will not have the option to edit it directly unless you have a theme specific setting to edit it.
Admin
Nikos Tzortzis
HI…..i just started using WP and i need some help! i want to publish articles from 3 different categories to 3 different pages.how can i make a page point to an article category?
Rob
Is there a way to customize the way post titles are displayed? I don’t want to display the full title of the post or page, just the keywords… much like you shorten the slug for your url. Actually this is exactly what I’m looking for, to display the slug as a link, and not the entire page title. Ideas?
Bryan Free
Great article, When I use the Recent post widget and set it to only display a category my sticky posts do not work. Have you encountered this before or know of a solution?
eyllan8547
Hi, thanks for this complete article.
I have a doubt, if I have my wordpress integrated with Magento, can I use magento within the short code to put the last entries in my magento house?
Mankirat Deep Kaur
The short code to display recent posts with thumbnails does not work… only shows the posts title not the thumbnails… how to fix this.??? please reply…:(
Kevin
Hi,
I am intending on adding the latest posts on my homepage, but I want a different section for the latest post to display on it’s own;
and another section under this designed differently for the latest posts that range from 2-5. (The 2nd, 3rd, 4th and 5th post).
What is the shortcode php for this to add to my theme template.
Many thanks.
James Gielow
Hello,
I have post shortcode on my page:
I’ve tweaked it a little bit as follows:
[display-posts posts_per_page=”100″ include_excerpt=”false” image_size=”large” wrapper=”div” orderby=”comment_count”]
I’m noticing that the spacing in between the posts is cutting off the titles and it makes the page look sloppy. What code can I add to add a little space after each post preview?
thanks in advance!
James
WPBeginner Support
Hi James,
You can adjust spacing between posts using CSS.
Admin
Paul
Thanks! I was struggling with adding recent posts to a page. Your guide saved me a lot of time
Erpel
Thank you for this tutorial!
WPBeginner Support
You are welcome
Admin
Adam
Love the idea, the only thing I don’t like is the display.
So it’s great how it has the thumbnail, title, excerpt, etc but the way the title and excerpt are positioned…I think they should be inline with the thumbnail, not at the bottom of it…it looks awkward and unappealing…any way to make it inline?
Kenneth
Please help me with this
How to display recently post in a post on phone version?
Reply please… Thanks
sai
If I am using 2 database. 1 for main site and 2nd for blog then how to add recent post on home page ?
djafa
Hi, I put [display-posts posts_per_page=”5″ post_type=”page”] on my post, but not working, can you help how to find the problem?
Kev
Great writeup. I want to display the recent post on a page. awahere am I suppose to paste the code?
Clark Keng
this article can help me thank you : )
Id abdou
gereat … thanks a lot .
PARAM
How to show thumbnail of 1st post bigger and others smaller…..
Brad
You could perhaps use :first-child CSS to do this.