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.

Add latest post widget block

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.

Customize recent posts widget block

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:

Latest posts in sidebar menu

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.

Add 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.

Customize recent posts with thumbnails

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.

Recent posts widget with thumbnails preview

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.

Change relevant settings

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:

Display recent posts shortcode

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:

Leave a Reply