Use template_include with custom post types
So, I’m not sure exactly what is causing the problem, but you might try the following: Plugin file path: replace dirname(__FILE__) with plugin_dir_path( __FILE__ ) Theme file path: replace TEMPLATEDIR with get_stylesheet_directory() It’s possible that the problem comes from referencing the constants directly.