我制作了四种自定义的帖子类型。我不明白为什么第四个没有出现在管理菜单中。
她的密码是:
drx\\U服务。php:
add_action( \'init\', \'drx_services_post_type\' );
function drx_services_post_type() {
register_post_type( \'drx_services\',
array (
\'labels\' => array (
\'name\' => __( \'Service-Angebote\' ),
\'singular_name\' => __( \'Service-Angebot\' )
),
\'taxonomies\' => array (\'post_tag\', \'category\'),
\'public\' => true,
\'menu_icon\' => \'dashicons-hammer\',
\'has_archive\' => true,
\'supports\' => array ( \'title\', \'editor\', \'thumbnail\', \'excerpt\' ),
\'rewrite\' => array (\'slug\' => \'service\')
)
);
}
include \'drx_srvcs_team.php\';
include \'drx_srvcs_cafe.php\';
include \'drx_srvcs_announcement.php\';
drx\\U srvcs\\U团队。php
add_action( \'init\', \'drx_service_team_post_type\' );
function drx_service_team_post_type() {
register_post_type( \'drx_service_team\',
array (
\'labels\' => array (
\'name\' => _x( \'Service-Team\', \'Post Type General Name\' ),
\'singular_name\' => _x( \'Service-Held\', \'Post Type Singular Name\' ),
\'menu_name\' => __( \'Service-Team\'),
\'all_items\' => __( \'Das Service-Team\'),
\'view_item\' => __( \'Service Held anzeigen\'),
\'add_new_item\' => __( \'Service-Held hinzufügen\'),
\'add_new\' => __( \'Neuer Service-Held\'),
\'edit_item\' => __( \'Service-Held bearbeiten\'),
\'update_item\' => __( \'Aktualisiere Service-Held\'),
\'search_items\' => __( \'Service-Held suchen\'),
),
\'taxonomies\' => array (\'post_tag\', \'category\'),
\'public\' => true,
\'menu_icon\' => \'dashicons-groups\',
\'has_archive\' => true,
\'supports\' => array ( \'title\', \'editor\', \'thumbnail\', \'excerpt\' ),
\'rewrite\' => array (\'slug\' => \'service-heroes\')
)
);
}
drx\\U srvcs\\U咖啡馆。php:
add_action( \'init\', \'drx_service_cafe_post_type\' );
function drx_service_cafe_post_type() {
register_post_type( \'drx_service_cafe\',
array (
\'labels\' => array (
\'name\' => _x( \'Repair Cafés\', \'Post Type General Name\' ),
\'singular_name\' => _x( \'Repair Café\', \'Post Type Singular Name\' ),
\'menu_name\' => __( \'Cafés\'),
\'all_items\' => __( \'Alle Cafés\'),
\'view_item\' => __( \'Café anzeigen\'),
\'add_new_item\' => __( \'Café hinzufügen\'),
\'add_new\' => __( \'Neues Café\'),
\'edit_item\' => __( \'Café bearbeiten\'),
\'update_item\' => __( \'Aktualisiere Café\'),
\'search_items\' => __( \'Café suchen\'),
),
\'taxonomies\' => array (\'post_tag\', \'category\'),
\'public\' => true,
\'menu_icon\' => \'dashicons-admin-multisite\',
\'has_archive\' => true,
\'supports\' => array ( \'title\', \'editor\', \'thumbnail\', \'excerpt\' ),
\'rewrite\' => array (\'slug\' => \'service-heroes\')
)
);
}
drx\\U srvcs\\U发布。php->这不显示!!
add_action( \'init\', \'drx_srvcs_announcement_post_type\' );
function drx_srvcs_announcement_post_type() {
register_post_type( \'drx_srvcs_announcement\',
array (
\'labels\' => array (
\'name\' => _x( \'Termine\', \'Post Type General Name\' ),
\'singular_name\' => _x( \'Termin\', \'Post Type Singular Name\' ),
\'menu_name\' => __( \'TERMINE\'),
\'all_items\' => __( \'Alle Termine\'),
\'view_item\' => __( \'Termin anzeigen\'),
\'add_new_item\' => __( \'Termin hinzufügen\'),
\'add_new\' => __( \'Neuer Termin\'),
\'edit_item\' => __( \'Termin bearbeiten\'),
\'update_item\' => __( \'Aktualisiere Termin\'),
\'search_items\' => __( \'Termin suchen\'),
),
\'taxonomies\' => array (\'post_tag\', \'category\'),
\'public\' => true,
\'menu_icon\' => \'dashicons-calendar\',
\'has_archive\' => true,
\'supports\' => array ( \'title\', \'editor\', \'thumbnail\', \'excerpt\' ),
\'rewrite\' => array (\'slug\' => \'termine\')
)
);
}
问题是:为什么第四个自定义帖子类型没有出现,我如何解决这个问题?