【发布时间】:2016-11-19 15:21:12
【问题描述】:
这是代码,第 5 个也是最后一个没有显示在 ADMIN CP 面板中。所有其他人都工作正常,但是当我尝试添加第五个时。什么都没有出现。不确定是否有限制或其他东西,似乎不是我所阅读的。
add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'Slides',
array(
'labels' => array(
'name' => __( 'slides' ),
'singular_name' => __( 'slide' )
),
'public' => true,
'has_archive' => true,
)
);
register_post_type( 'Programs',
array(
'labels' => array(
'name' => __( 'programs' ),
'singular_name' => __( 'program' )
),
'public' => true,
'has_archive' => true,
)
);
register_post_type( 'Boards',
array(
'labels' => array(
'name' => __( 'Boards' ),
'singular_name' => __( 'sponsor' )
),
'public' => true,
'has_archive' => true,
)
);
【问题讨论】:
-
板子自定义帖子不显示在后端
标签: php arrays wordpress custom-post-type posts