Was able to fix the issue of trying to use the template in the query loop by using a standard PHP include.