Moved WP template files into templateFiles function