Title: Could not load template&#8230;
Last modified: August 21, 2016

---

# Could not load template…

 *  [PaulD](https://wordpress.org/support/users/paulio51/)
 * (@paulio51)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/could-not-load-template/)
 * Hi
    Wanted to first thank you for taking on this project. This is a wonderful
   plugin and I for one appreciate your time spent on this.
 * After upgrading to the latest version of both wordpress and league manager I 
   was getting the ‘Could not load _template_‘ warning for a custom template I had
   on my home page. Digging deeper into the code to find out what the issue was 
   as I had not changed anything other than upgrading I found the use of TEMPLATEPATH
   in shortcodes.php. Correct me if I am wrong but I understand that TEMPLATEPATH
   has been deprecated.
 * Changing this to get_stylesheet_directory() fixed the issue (especially since
   I am using a child theme).
 * Thanks
    Paul
 * [https://wordpress.org/plugins/leaguemanager/](https://wordpress.org/plugins/leaguemanager/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [LaMonte Forthun](https://wordpress.org/support/users/lamontef/)
 * (@lamontef)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/could-not-load-template/#post-4802209)
 * I’m pouring through the code updating it to remove any strict errors and deprecated
   functions, so I appreciate the tip on this one, hadn’t seen it before… I’ll fix
   it in the next release.
 *  Thread Starter [PaulD](https://wordpress.org/support/users/paulio51/)
 * (@paulio51)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/could-not-load-template/#post-4802227)
 * No problem. I don’t understand why it would all of a sudden start throwing this
   error though. From what I can gather TEMPLATEPATH has been deprecated since 3.0.
   Take your time as apparently I am one of a few, if not the only one, that uses
   a custom template under a child theme.
 *  Plugin Author [LaMonte Forthun](https://wordpress.org/support/users/lamontef/)
 * (@lamontef)
 * [12 years ago](https://wordpress.org/support/topic/could-not-load-template/#post-4802373)
 * Hey Paul, I updated the code to include this change, sort of. I didn’t go to 
   child templates, just parents, I want to work with child themes a bit more to
   get it right. If you’ve got any code you’d like to share that I can possibly 
   implement, let me know.
 * Thanks
 *  Thread Starter [PaulD](https://wordpress.org/support/users/paulio51/)
 * (@paulio51)
 * [12 years ago](https://wordpress.org/support/topic/could-not-load-template/#post-4802384)
 * Hi LaMonte, was get_stylesheet_directory() throwing errors for you?
    My understanding
   of get_stylesheet_directory() is that it returns the stylesheet directory Path
   for the current theme/child theme. Shouldn’t have any impact on the end user 
   if they are using a standard base theme. I have tested with a base/regular theme
   and it points to the right directory on my local install. Just so we are on the
   same page I’m looking in shortcodes.php, the last 2 functions loadTemplate() 
   and checkTemplate() in which you used get_template_directory(). Using get_stylesheet_directory()
   should point to the right directory whether you are using a regular theme or 
   child theme.
 * Thanks again for all your time on this. 🙂
    Paul
 *  Plugin Author [LaMonte Forthun](https://wordpress.org/support/users/lamontef/)
 * (@lamontef)
 * [12 years ago](https://wordpress.org/support/topic/could-not-load-template/#post-4802392)
 * Hi Paul, I actually didn’t test get_stylesheet_directory, I’ll do that before
   I release the next version, probably today or tomorrow. Thanks for the help on
   this.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Could not load template…’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/leaguemanager.svg)
 * [LeagueManager](https://wordpress.org/plugins/leaguemanager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaguemanager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaguemanager/)
 * [Active Topics](https://wordpress.org/support/plugin/leaguemanager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaguemanager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaguemanager/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [LaMonte Forthun](https://wordpress.org/support/users/lamontef/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/could-not-load-template/#post-4802392)
 * Status: not resolved