Use Two Loops to Output Your First Blog Post Differently
read more
Categories

Use Two Loops to Output Your First Blog Post Differently


I think it’s safe to say that if you’re a blogger, you want to highlight the most recent content on your blog so that people will spot it and read it. There are a few ways you could do this, including using different styling for the first post on your blog page to highlight it or displaying it prominently in your sidebar.

In this tutorial I’ll show you how to go a bit further than you can using CSS: instead of simply styling your first blog post differently, you’ll output different content for it. Specifically, the first post will have a title, featured image and content, while other posts will just have the title, featured image and excerpt.