开发者

Deliver default templates with wordpress plugin

开发者 https://www.devze.com 2023-02-15 15:15 出处:网络
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 docume

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开发者_Python百科 to their theme's directory.


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/


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

0

精彩评论

暂无评论...
验证码 换一张
取 消