Originally Posted by
DrByte
If calling "$template->get_template_part()" returns an error saying "Call to a member function get_template_part() on null",
that means that the $template variable has either not been defined yet or has been unset() (ie: removed) or set to blank (null).
This could happen if the auto-loader infrastructure doesn't load the template components (do you have new/altered code in includes/auto_loaders or /includes/init_includes directories?) due to having custom loading scripts or failures to load the usual scripts.
Or it could be that some code you've added is resetting the $template variable to something other than the object it is expected to be.
Bookmarks