我想知道我是否将自定义帖子类型分组,以便在wordpress后端菜单栏中显示在一个组中,如下图所示,我必须在函数中使用什么代码。php,这样我可以给我的自定义帖子类型一个很好的外观和感觉:
目前我正在使用一个自定义插件来添加函数,它看起来像这样
<?php
/**
* Plugin Name: Custom Functions
* Plugin URI: http://localhost/
* Description: This is an awesome custom plugin with functionality that I\'d like to keep when switching Themes.
* Author: Phantom.omaga
* Version: 0.1.0
*/
/* Place custom code below this line. */
add_action( \'init\', \'create_post_type\' );
function create_post_type() {
/*Custom post type Series has been decleared here*/
register_post_type( \'series\',
array(
\'labels\' => array(
\'name\' => __( \'Series\' ),
\'singular_name\' => __( \'Series\' )
),
\'public\' => true,
\'menu_position\' => 40,
\'rewrite\' => array(\'slug\' => \'Series\')
)
);
/*Custom post type Episodes has been decleared here*/
register_post_type( \'epsodes\',
array(
\'labels\' => array(
\'name\' => __( \'Episodes\' ),
\'singular_name\' => __( \'Episode\' )
),
\'public\' => true,
\'menu_position\' => 41,
\'rewrite\' => array(\'slug\' => \'Episodes\')
)
);
/*Custom post type Mirrors has been decleared here*/
register_post_type( \'Mirrors\',
array(
\'labels\' => array(
\'name\' => __( \'Mirrors\' ),
\'singular_name\' => __( \'Mirror\' )
),
\'public\' => true,
\'menu_position\' => 41,
\'rewrite\' => array(\'slug\' => \'Mirror\')
)
);
}
/* Place custom code above this line. */
?>