I am introducing a WP_Query loop inside a custom post type. To get pagination to work (and to allow the user to go to /page/2, /page/3, etc.) I had to add the following code to my functions.php file: