How to Show Posts from Specific Category in WordPress

Running a website with many posts is like owning a bookstore with thousands of books. As a store owner, you should organize your books in an intuitive and user-friendly way. The best way to do this is display all related books on the same shelf or in a specific section.

For online content, this is similar to adding all of your related posts to a specific category. However, it’s also important that you display relevant categories to your users when they’re scrolling your website – e.g. if they’re scrolling an article about pencils, recommend them articles from the same or similar categories, like pens, rulers, and stationery.

In this article, we’ll show you how to display this information on your website.

Why are posts from a specific category displayed in WordPress?

Relevant posts make it easier for people to find what they need. Users want to access information intuitively, and if your website doesn’t allow them to do this, they will likely look elsewhere.

By displaying categories of specific pages, you can also increase the amount of time visitors to your website spend scrolling your content. Instead of leaving your users unfulfilled in their query, we should make it as easy as possible for them to find what they’re looking for.

How to display the latest posts from a specific category on a WordPress page or in a post

First, you need to open the page to which you want to add the latest posts.

Here you click on the “add new block” button (+). Scroll down to see the WIDGETS section and select “Recent posts”.

ppwp-display-latest-post-category

This action will display the latest posts from all categories by default. If you only want to see posts from certain categories, scroll down to the Sort and filter section in the block settings.

Here, select the name of the categories from which you want to show posts.

ppwp-display-latest-post-category-filter

The block settings also offer you many options such as displaying the image, author, date and content.

ppwp-display-latest-post-category-settings

When you are finished, you can save your settings and display a preview.

How to display posts from a specific WordPress category in the sidebar

We’ve gone through basic instructions on how to add posts to pages using Gutenberg blocks. But if you want to display posts in your sidebar, you might need the help of a plugin like the Recent Posts Widget With Thumbnails plugin.

Although WordPress has a built-in default widget that allows you to display the latest posts in your site’s sidebar or other widgetized area, you can’t filter posts by category.

This is where the Recent Posts Widget With Thumbnails plugin comes in. First, you need to install and activate the plugin on your website. This plugin is completely free and you can download it directly from the WordPress plugin directory.

Then navigate to Appearance > Widgets. At the bottom of the page, you should see the “Recent Posts With Thumbnails” widget.

ppwp-recent-posts-widget-settings

Add it to your sidebar or another area with widget functionality.

ppwp-recent-posts-widget-add-sidebar

The “Recent Posts With Thumbnails” widget has many options that allow you to customize how recent posts are displayed in your sidebar.

You can also show excerpts, show posts from specific categories, ignore sticky posts, display random posts and much more. When you are finished, click the Save button to apply all settings.

Conclusion

Creating an intuitive and engaging website is important if you want to keep users on your website. By displaying the latest posts from specific categories, you can help to ensure they find everything they need without needing to look elsewhere.

You can choose to display the posts on the pages or in the sidebar. To add posts to pages, you can use do this using blocks. To add posts sorted by category in the sidebar, the Recent Posts Widget With Thumbnails plugin is the best choice.