One of the main goals of every website is to keep visitors engaged for as long as possible. And this really boils down to having more content that a visitor is interested in. Thus, displaying recent posts by category is a great idea in WordPress.
This allows users to view the latest content in a category they are interested in. It is very similar to showing off related posts, but this has a bigger focus on showing off your newest content.
Today, I will demonstrate how to do this using multiple methods.
Method 1: Using WordPress Blocks to Show Category Posts
Perhaps the easiest way to do this is by using the built-in tools WordPress provides. In this case, that would be the Latest Posts block.
As the name implies, the latest posts block displays the latest posts that have been published on your website. By default, it will include any category, but you can customize it to filter for a specific category.
As with all blocks in WordPress, you are not just limited to displaying this in your posts and pages. Instead, you can also add it as a widget in your header, footer, or sidebar area. As such, it is a powerful tool you can use.
Step 1: Displaying Category Posts In Posts & Pages
Let’s begin by showing how this block works in pages and posts. It does not matter which one you choose as the process is identical. Thus, start by visiting the post or page in which you would like to display the list.
Once there, add the Latest Posts block to the post or page.
The block will automatically show the 5 latest posts on your site in a list. On the right-hand side, you should see the block’s settings. Here, we can customize the block to display what we want.
Locate the Sorting and Filtering section. Here you should see a Categories option. You can type the category you wish to display in the box. Alternatively, you can enter multiple categories separated by a comma.
At this point, you are technically done, but you could customize the block further. For instance, by default, you only display five posts, you can change this value to better fit your needs by using the slider below where you entered the categories.
Another change you may consider making is what is actually displayed. By default, the block simply lists the post title as a link to said post. You can change this to include a short excerpt of the content. It is also possible to display the featured image.
All of this can be found in the settings section and enabled by flipping a switch.
Step 2: Using the Latest Posts Block as A Widget
Without a doubt, the widget area is a better choice to display the latest or related posts. This is because it is visible on any post or page the user is on, thus, they have a higher chance of engaging with it when they finish reading one article.
Luckily, everything we just went over is identical in this step, so I will not be as detailed. Instead, simply go to the widget area of WordPress and add the Latest Posts block to the desired widget area.
Nothing is different from the previous step in terms of setup, however, you need to be more mindful about spacing.
For example, I mentioned how to change the number of posts that get displayed, include an excerpt, and show off a featured image. That just isn’t feasible in a narrow widget area.
You need to keep it as barebones as possible because you are working with a much smaller space.
Method 2: Using the Category Posts Widget Plugin
While the Latest Posts block is probably the easiest way to achieve this, there are plugins that you can consider. One such is the Category Posts Widget plugin. It’s a free tool that is easy to set up and can be added to virtually any website with a sidebar.
It is quite similar to the Latest Posts block we just covered, but a bit more robust. It was made specifically for use in the widget areas.
Step 1: Install Category Posts Widget
Start by clicking on Plugins and selecting the Add New option on the left-hand admin panel.
Search for Category Posts Widget in the available search box. This will pull up additional plugins that you may find helpful.
Find the Category Posts Widget plugin, click on the “Install Now” button, and activate the plugin for use.
Step 2: Add the Category Posts Widget
Unlike most plugins, there is no dedicated settings page. This is because the plugin simply adds a widget, thus customizing the widget is the same as going through some settings. Luckily, this is no different than adding any other widget in WordPress.
Click on Appearance and select the Widgets option.
Locate the widget area you want to add it to and search for the Category Posts widget.
The widget itself is broken up into multiple sections. There is nothing too complicated, but you will need to go through each one.
Title
The first section is for adding a title to the widget. There’s not much to say here other than to add something simple and easy to understand. This title is shown at the top of the widget in the sidebar of your website.
By default, it is Category posts, but you could change it to “You May Also Like:” or something along those lines.
You can also turn the title into a link to another page if you wish by entering the URL in the appropriate box. You can also choose what type of Header should be used for the title. Simply enter a title in this section and move on.
Filter
The Filter section is where all of the magic happens. This is where you tell the plugin how many posts to display, how recent the posts should be, and which categories to include. You can also choose the way the posts are ordered.
Post Details
The Post Details section is pretty much what it sounds like. This is how you display information from the posts you are showing off. By default, it displays the post title and the thumbnail. That said, you can display more or less.
To add items to it, simply click on the “Add Placeholder” button and select the item you want to add. For instance, you can add an excerpt or display the date that the post was published.
Just remember you have limited space in the widget area, so don’t add too much.
Wrapping Up
All that’s left are the General and Footer sections. There’s not much to say other than go to each one and enable or disable the features you want to include. The widget saves automatically as you make changes, so there are no save options to worry about.
With that, you know how to use the Category Posts Widget plugin.
Other Ways to Show Category Posts
While the two methods we have demonstrated are some of the easiest, there is no shortage of plugins you can choose from. I mentioned at the start that this was quite similar to displaying recent posts in WordPress.
Any plugin that can deal with recent posts, will often be able to show category posts. As such, just search through the plugin directory and choose one that suits your needs. Some plugins have different features or customization options that can fit your site better.
For instance, a popular option is YARPP, Yet Another Related Post Plugin. It has a lot of flexibility and is compatible with bbPress forums, WooCommerce online stores, and various custom post types.
It really just comes down to finding the right tool for the job and there are hundreds of plugins you can choose from in this case.
Category Posts FAQ
It depends on what you want to achieve. Related posts ensure that everything being displayed to the user is interesting to them, whereas category posts just display a single type of content. Thus, a user may not be interested in what you are displaying if the category is not relevant to the current post or page.
Yes. Thumbnails exist to try and capture the visitor’s attention. Both methods allow you to add thumbnails for the posts you are showing off but be sure to size them correctly if it is for the widget area.
Many websites choose the footer area to display such content. This targets readers who have finished reading an article and tries to get them to read another instead of them leaving the site. However, many have found success by embedding the list of posts within the content itself.
Absolutely! You can just add a second Latest Posts block and select a different category to display. There is no limit on the number of blocks you can add but be mindful that displaying too many options can overwhelm users.
I would recommend the Latest Posts block as it really has everything you need and that is one less plugin installed on your site. Each plugin you install ultimately slows down your website and uses up server resources, thus it is best to avoid them when you can.
Boost Visitor Engagement
The entire point of showing off category posts in WordPress is to help point visitors to that content. For example, maybe you just added a new category and want to show it off to your user base.
Well, this is a great way to do it. Or, perhaps the focus of your website is on one category, and you want to make that clear to visitors. No matter your reason, the end goal is to boost user engagement.
The more time they spend on your website, the better your website will do.
Do you prefer using the Latest Posts block or a plugin? Has adding category posts improved user engagement?