• I am creating a plugin and have a templated based at /my-plugin/templates/mytemplate.php. Is there a way to make this available to wordpress without having to copy this to the theme directory?

Viewing 2 replies - 1 through 2 (of 2 total)
  • As of 3.0, it’s possible to use the template_include filter for this. Do a check in your hooked function to see if you think your template should be used, and if so, return the appropriate path to your template; otherwise, return the argument you were passed by WordPress.

    Thread Starter titan21

    (@titan21)

    Thanks pbaylies – i tried this and it worked however what I wanted is that the template appear in the list of available templates in the page screen in admin? Is there a way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Templates’ is closed to new replies.