How to Display Recent Posts from a Specific Category in WordPress

Display Recent Posts From A Specific Category In WordPress

Are you looking for ways to display recent posts from a specific category in WordPress? The default recent posts widget shows posts from all the categories and also there is no option to filter them by categories. But, today, here at DevotePress, we are going to show you how you can easily display recent posts from a specific category in WordPress.

Your WordPress site already has separate pages for each category by default if you want to create a page to display recent posts from a particular category. However, if you want to display recent posts from a specific category in your sidebar, then there is no default widget to do that. The default recent posts widget does not allow you to filter posts by category or tags. The good thing is, there is another easy way to do that.


Display Recent Posts from a Specific Category in WordPress using Plugin


Showing the recent posts from a specific category in WordPress using a plugin is quite easy and recommended for everyone, including the WordPress beginners.

First of all, you need to install and activate the Recent Posts Widget Extended plugin. The plugin will enable a custom, flexible and super advanced recent posts customization.

After activating the plugin, you need to visit the Appearance > Widgets page and add “Recent Posts Extended” widget to your sidebar.

limit to category

The widget menu will now expand to show its advanced settings. You need to select the category or categories that you want to display under the “Limit to Category” option.

The widget will provide you with advanced customization options. You can show post thumbnail, date, relative date, post summary/excerpts, and more.

You can make changes as per your will on the settings page. Don’t forget to click on the Save Button after you’re done customizing the plugin.

recent posts by category

Also, not to forget, the Recent Posts Extended Widget also allows you to use a shortcode to display recent posts anywhere on your website, including the posts and pages.

You need to edit the post or page where you want to display the recent posts from a specific category. You just have to add the following shortcode:

 [rpwe limit="5" excerpt="true" cat="72" ]

This shortcode will display 5 recent posts from a specific category with the post excerpt. You will have to replace the cat value with the ID of the category that you would like to display. After adding the shortcode, you can save your post or page and view your changes.

That is all there is. You can now visit your website to see the recent posts from specific category displayed on your website.

If you have anything to share, add, or ask, feel free to use the comments section below. We’d love to hear from you.

 

Reference: WP Beginner

1 thought on “How to Display Recent Posts from a Specific Category in WordPress

  1. lolnexus says:

    It is a great article. You will surely like this also because it is a great stuff, yeah it’s give us lots of interest and pleasure. Their opportunities are so fantastic and working style so speedy. Thank you for sharing the nice article.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *