我使用文件“taxonomy-accommodation-categories.php”创建了一个名为“accommodation”的自定义帖子类型和名称为“categories”的分类法 - 这在我的WordPress主题中运行正常 .
但是我想在一个单独的插件中添加它,有人知道我该怎么做吗?
感谢任何帮助,谢谢 .
我想这就是你要找的东西 . https://gist.github.com/vishalbasnet23/4cf739624ba3b75e75d8
wordpress codex有关于如何执行此操作的说明,https://codex.wordpress.org/Plugin_API/Filter_Reference/single_template
之前发布的github链接也有相同的内容,但更多解释
2 回答
我想这就是你要找的东西 . https://gist.github.com/vishalbasnet23/4cf739624ba3b75e75d8
wordpress codex有关于如何执行此操作的说明,https://codex.wordpress.org/Plugin_API/Filter_Reference/single_template
之前发布的github链接也有相同的内容,但更多解释