I am working on a blog currently and would like to style a featured post (which will be the most recent) differently than the previous posts on the page. I have been toying around with how to select the first child with an if statement and then moves into a for loop over the other children posts. I have the for loop working perfectly, but I can’t get it to select the first child, it just ignores it.
You have a couple of options… you could use the CSS selector :first-child to select the first ‘blog post’ in a collection. Or you could add a class, or use a different template even to render the first blog post by: