Use template_include with custom post types

So, I’m not sure exactly what is causing the problem, but you might try the following:

  1. Plugin file path: replace dirname(__FILE__) with plugin_dir_path( __FILE__ )
  2. Theme file path: replace TEMPLATEDIR with get_stylesheet_directory()

It’s possible that the problem comes from referencing the constants directly.

Leave a Comment