WordPress snippet: Wrap teaser content with a div

This is a nice little snippet of code I wrote today for my domain simple-fields.com.

I wanted to be able to style to content before the “More tag”, using it as a teaser on a page. This solution wraps all content before the more-tag with a div with the class .entry-content-teaser, making it super simple to style it, like adding font-weight: bold to it.

Check out the code and copy, paste, fork, whatever: