Php 为什么Wordpress仪表板中的第二个菜单不显示?
我为Wordpress仪表板创建了两个菜单,第一个功能正常,但第二个没有出现。我不知道为什么 这是我的代码:Php 为什么Wordpress仪表板中的第二个菜单不显示?,php,wordpress,menu,dashboard,Php,Wordpress,Menu,Dashboard,我为Wordpress仪表板创建了两个菜单,第一个功能正常,但第二个没有出现。我不知道为什么 这是我的代码: 有人能解释一下我的问题吗?版本先于hp太长了,最多可以20个字符。不出现是什么意思?你叫它哪儿?您是否在管理中为其分配了项目?您在管理中分配了菜单了吗?它没有出现在我创建的“Program 2015 HP”下面左侧的仪表板管理菜单中。functions.php文件使用以下命令调用此数组:include'inc/post type.php';我可以在哪里分配管理中的项目和菜单? // P
有人能解释一下我的问题吗?
版本先于hp
太长了,最多可以20个字符。不出现是什么意思?你叫它哪儿?您是否在管理中为其分配了项目?您在管理中分配了菜单了吗?它没有出现在我创建的“Program 2015 HP”下面左侧的仪表板管理菜单中。functions.php文件使用以下命令调用此数组:include'inc/post type.php';我可以在哪里分配管理中的项目和菜单?
// Programme 2015 CPT
$labels = array(
'name' => _x( 'Programme 2015 HP', 'Post Type General Name', 'test' ),
'singular_name' => _x( 'Programme 2015 HP', 'Post Type Singular Name', 'test' ),
'menu_name' => __( 'Programme 2015 HP', 'test' ),
'parent_item_colon' => __( 'Parent Item:', 'test' ),
'all_items' => __( 'Tous les blocs programme 2015 en HP', 'test' ),
'view_item' => __( 'Voir le Programme 2015', 'test' ),
'add_new_item' => __( 'Ajouter un bloc au Programme 2015 en HP', 'test' ),
'add_new' => __( 'Ajouter', 'test' ),
'edit_item' => __( 'Editer', 'test' ),
'update_item' => __( 'Mettre à jour', 'test' ),
'search_items' => __( 'Chercher', 'test' ),
'not_found' => __( 'Not found', 'test' ),
'not_found_in_trash' => __( 'Not found in Trash', 'test' ),
);
$args = array(
'label' => __( 'programme-2015', 'test' ),
'description' => __( 'Les blocs programme dans la HP', 'test' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', ),
'hierarchical' => false,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-media-text',
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'programme-2015', $args );
// Editions précédentes HP
$labels = array(
'name' => _x( 'Editions précédentes', 'Post Type General Name', 'test' ),
'singular_name' => _x( 'Editions précédentes', 'Post Type Singular Name', 'test' ),
'menu_name' => __( 'Editions précédentes', 'test' ),
'parent_item_colon' => __( 'Parent Item:', 'test' ),
'all_items' => __( 'Toutes les éditions précédentes', 'test' ),
'view_item' => __( 'Voir une édition précédente', 'test' ),
'add_new_item' => __( 'Ajouter une année précédente', 'test' ),
'add_new' => __( 'Ajouter', 'test' ),
'edit_item' => __( 'Editer', 'test' ),
'update_item' => __( 'Mettre à jour', 'test' ),
'search_items' => __( 'Chercher', 'test' ),
'not_found' => __( 'Not found', 'test' ),
'not_found_in_trash' => __( 'Not found in Trash', 'test' ),
);
$args = array(
'label' => __( 'editions-precedentes-hp', 'test' ),
'description' => __( 'Les blocs éditions précédentes en HP', 'test' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', ),
'hierarchical' => false,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-microphone',
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'editions-precedentes-hp', $args );
}
"// Hook into the 'init' action
add_action( 'init', 'jm_custom_post_type', 0 );"