This members-only tutorial provides the steps to automatically display posts in WordPress grouped by their categories.

We shall get all the non-empty categories in ascending order, loop through them, show the category title with the category archive link and for each, fetch three latest posts from that category, print the featured image + post title linked to the permalink for each post and style the output using CSS Grid.

While the steps are Oxygen-specific, this works in any WordPress site.

Step 1 - Register Custom Image Size

Register a custom image size for the featured images in the posts.

Add the following Code Snippet:

add_image_size( 'category_image', 600, 338, true ); // 16 x 9

Regenerate thumbnails.

Step 2 - The PHP

Create a static Page and edit it with Oxygen.

Add a Code Block.

Set its width to 100%.


This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?


Find the article helpful and wish to donate?



You need to be logged in to view and post comments.
Not a member yet? Join here.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: