Noticed that it isn’t an import problem.
It also exists if I create a new post manually, but only with multisite. I typed the code for cusstom post type in the theme’s functions.php, that is used by every blog in the multisite (also tried it with only one blog that uses this theme).
Is there anything different I have to do for custom post types when using multisite?
My custom post type code:
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Books', 'Post Type General Name' ),
'singular_name' => _x( 'Book', 'Post Type Singular Name' ),
'add_new_item' => __( 'Add New Book', 'text_domain' ),
'add_new' => __( 'Add New', 'text_domain' ),
'edit_item' => __( 'Edit Book', 'text_domain' ),
'update_item' => __( 'Update Book', 'text_domain' ),
'search_items' => __( 'Search Books', 'text_domain' ),
'not_found' => __( 'No Books found', 'text_domain' ),
'not_found_in_trash' => __( 'No Books found in Trash', 'text_domain' ),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'supports' => array('title','editor','thumbnail','categories','custom-fields','comments','author'),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => '',
'query_var' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'books', $args );
register_taxonomy(__( 'books_category' ),
array('books'),
array('hierarchical' => true,
'label' => 'Books Categories',
'rewrite' => true,
'query_var' => true
));
register_taxonomy(__( 'books_tag' ),
array('books'),
array('hierarchical' => false,
'label' => 'Books Tags',
'rewrite' => true,
'query_var' => true
));
}
add_action( 'init', 'custom_post_type', 0 );