Restrict Pages in WordPress to Require a Login

This week, we were finishing up implementing a custom theme on a client site and they requested that we build some kind of interaction where some of the pages were restricted to registered subscribers. At first, we thought about implementing third party plugins, but the solution was actually quite simple. First, we copied the page template to a new file (any name is fine, just maintain the php extension). At the top of the page,