Take the tour ×  I am creating a Custom Post Type using a custom
plugin. One of the requirement of the custom post type is to be
presented in a table layout for print / email purpose.  It seems
that the logical solution for this situation is to include a
specific template file in the plugin which will be used on
single Custom Post Type query instead of the single.php /
index.php provided in the theme.  How can I use a file in my
plugin as a replacement for single.php / index.php on single
custom-post-type query?  Thank you in advance.  share|improve
this question add comment  1 Answer  up vote 3 down vote
accepted  The way I handle these is to store to use
template_include to conditionally pass my plug-in template. One
of these conditions is that the corresponding file hasn't
already been found by WordPress (i.e. isn't present in the theme
folder).  This means that users can over-ride the plug-in
template with a theme-specific one by simply creating the
appropriate template in their theme. As such they can ma