How to Add Recent Posts by Category Using the Block Editor

Adding Recent Posts by Category Using Block Editor

By default, WordPress comes with the latest posts block in the block editor. It allows you to easily display recent posts inside a page or post, and you can even filter them by category.

First, you need to edit the post or page where you want to display the recent posts by category. On the post edit screen, click on the add new block button (+) and then look for the ‘latest posts’ block.

You will see the block appear in the content area with a preview of your recent posts. Simply click to select the block, and you’ll see block settings in the right column.

At the top of the settings, you will see different options like showing featured image, post author, date, and content.

Now, you need to scroll down to the Sorting and filtering section under the block settings. From here, you need to enter the name of the category you want to show posts from.

You can even select multiple categories by separating category names with a comma.

You’ll notice the preview of your recent posts will change to only include posts from the categories you have chosen.

You can now save your post or page and preview it in a browser window. Here is how it looked on our test site showing recent posts from a specific category with featured images and post excerpts.