admin管理员组文章数量:1414908
I looked at some answers and didn't help
I'm trying the next section (right away) but it returns the template if errors in WordPress's built-in function lines. Like get_header ()
add_filter('template_include', 'my_custom_template');
function my_custom_template($single) {
global $post;
/* Checks for single template by post type */
if ( $post->post_type == 'simulators' ) {
return SIMULATOR_URI . 'inc/themes/admin/single-simulators.php';
}
return $single;
}
Basically, the template is already listed in WordPress templates, is there an easy way to set it as a custom post template?
本文标签: Set a template on a custom post in the plugin
版权声明:本文标题:Set a template on a custom post in the plugin 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745176920a2646282.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论