There appears to be a conditional function sorely missing from WordPress Core. We can test if we’re currently on a single post using is_singular(), or if we’re on a page using is_page() or if we’re on the home page with is_home(), and so forth. Sadly we cannot test if the current page is in fact displaying the blog with something like is_blog().
I wanted to test this condition and display a special layout if true, so I had to write my own. Turns out you’ll have to test for quite a few cases to make this foolproof. Thankfully, Wesbos already compiled such a useful function on GitHub, so I’ve forked it:
Essentially it tests if we’re currently on any archive page that’s displaying regular blog posts, returning true if that’s the case. I’ve updated it with my prefix, just in case they ever DO implement it in WordPress. That way, my sites won’t break.