d135-1r43
d135-1r43

Reputation: 2485

Deliver default templates with wordpress plugin

My self written Wordpress plugin includes a custom post type. I want to deploy a default template for this post type. Is it possible to do this inside the plugin's directory? I cannot find any documentation on this.

Having the plugin running "out of the box" seems better to me than telling the user to copy the default template to their theme's directory.

Upvotes: 2

Views: 502

Answers (2)

José Carlos
José Carlos

Reputation: 1015

It should be defined on templates directory as single-xxxx.php

Upvotes: 0

Paul
Paul

Reputation: 46

This article has a walkthrough of the functions you'll need to include page templates in your plugin: http://www.unfocus.com/2010/08/10/including-page-templates-from-a-wordpress-plugin/

Upvotes: 3

Related Questions