Custom post type not showing in admin menu

I made four custom post types. And I can’t figure out, why the fourth one is not showing up in the admin menu.

her is the code:

drx_services.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_srvcs_team.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_srvcs_cafe.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_srvcs_announcement.php -> THIS is not showing!!

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’)
)
);
}

The question: why is the fourth custom post type not showing up, how can I fix this?

Read more here:: Custom post type not showing in admin menu

Leave a Reply

Your email address will not be published. Required fields are marked *