我已经创建了自定义帖子类型和单个页面模板,它可以正常工作。但是我在为单个页面启用评论时遇到问题。WordPress自定义帖子类型单页(评论)
这是我的函数:
add_action('init', 'vblog');
function vblog() {
register_post_type('vblog', array(
'labels' => array(
'name' => __('VTV'),
'singular_name' => __('VTV'),
'add_new' => 'Add New VBlog',
'add_new_item' => 'Add New VBlog',
'edit' => 'Edit VBlog',
'edit_item' => 'Edit VBlog',
'new_item' => 'New VBlog',
'view' => 'View VBlogs',
'view_item' => 'View VBlog',
'search_iteme' => 'Search VBlogs',
'not_found' => 'No VBlogs Found',
'not_found_in_trash' => 'No VBlogs found in Trash',
'parent' => 'Parent VBlog',
),
'public' => true,
'supports' => array('title', 'editor','custom-fields', 'thumbnail', 'revisions', 'comments'),
'taxonomies' => array('category', 'post_tag')
));
}
所以我确信,我支持阵列中增加了 “意见”。请帮助!!!
自定义后类型的单一模板评论。就像'<?php comments_template('',true); ?>' – tamilsweet