Habe ein CPT angelegt, dieses soll als basis dienen um BEiträge zu posten, im momennt noch fast wie normale beiträge.
Wenn ich aber einen Beitrag schriebe und auf anzeigen klicke bekomme ich einen 404 error.
Code
add_action( 'init', 'register_cpt_testgruppe_1' );
function register_cpt_testgruppe_1() {
$labels = array(
'name' => _x( 'Testgruppe 1', 'testgruppe_1' ),
'singular_name' => _x( 'Testgruppe 1', 'testgruppe_1' ),
'add_new' => _x( 'Add New', 'testgruppe_1' ),
'add_new_item' => _x( 'Add New Testgruppe 1', 'testgruppe_1' ),
'edit_item' => _x( 'Edit Testgruppe 1', 'testgruppe_1' ),
'new_item' => _x( 'New Testgruppe 1', 'testgruppe_1' ),
'view_item' => _x( 'View Testgruppe 1', 'testgruppe_1' ),
'search_items' => _x( 'Search Testgruppe 1', 'testgruppe_1' ),
'not_found' => _x( 'No testgruppe 1 found', 'testgruppe_1' ),
'not_found_in_trash' => _x( 'No testgruppe 1 found in Trash', 'testgruppe_1' ),
'parent_item_colon' => _x( 'Parent Testgruppe 1:', 'testgruppe_1' ),
'menu_name' => _x( 'Testgruppe 1', 'testgruppe_1' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'description' => 'Posts der ersten Testgruppe',
'supports' => array( 'title', 'editor', 'comments' ),
'taxonomies' => array( 'category', 'post_tag' ),
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'has_archive' => true,
'query_var' => true,
'can_export' => true,
'rewrite' => true,
'capability_type' => 'post'
);
register_post_type( 'testgruppe_1', $args );
}
Alles anzeigen
kann mir jemand bei der fehlersuche helfen?