Bulk edit taxonomies on a custom post type
I have created a custom post type for vehicle listings and an associated taxonomy for manufacturers (code for both below).
Im finding that I’m not able to edit the taxonomies via the bulk edit option on the edit.php view. Selecting the posts via the check boxes and then selecting Edit from the bulk actions drop down, I would expect to see the taxonomies that have been added to the selected posts and be able to remove them.
This is the custom post type code
$labels = array(
'name' => _x( 'Vehicles', 'Post type general name', 'cultivate_base_theme' ),
'singular_name' => _x( 'Vehicle', 'Post type singular name', 'cultivate_base_theme' ),
'menu_name' => _x( 'Vehicles', 'Admin Menu text', 'cultivate_base_theme' ),
'name_admin_bar' => _x( 'Vehicles', 'Add New on Toolbar', 'cultivate_base_theme' ),
'add_new' => __( 'Add New', 'cultivate_base_theme' ),
'add_new_item' => __( 'Add New Vehicle', 'cultivate_base_theme' ),
'new_item' => __( 'New Vehicle', 'cultivate_base_theme' ),
'edit_item' => __( 'Edit Vehicle', 'cultivate_base_theme' ),
'view_item' => __( 'View Vehicle', 'cultivate_base_theme' ),
'all_items' => __( 'All Vehicles', 'cultivate_base_theme' ),
'search_items' => __( 'Search Vehicles', 'cultivate_base_theme' ),
'parent_item_colon' => __( 'Parent Vehicle:', 'cultivate_base_theme' ),
'not_found' => __( 'No Vehicles found.', 'cultivate_base_theme' ),
'not_found_in_trash' => __( 'No Vehicles found in Trash.', 'cultivate_base_theme' ),
'featured_image' => _x( 'Vehicle Image', 'cultivate_base_theme' ),
'set_featured_image' => _x( 'Set Vehicle image', 'cultivate_base_theme' ),
'remove_featured_image' => _x( 'Remove Vehicle image', 'cultivate_base_theme' ),
'use_featured_image' => _x( 'Use as Vehicle image', 'cultivate_base_theme' ),
);$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'taxis-for-sale' ),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'revisions' ),
'menu_icon' => 'dashicons-car',
'taxonomies' => array( 'manufacturers' ),
);
register_post_type( 'vehicles', $args );
This is the custom taxonomy code
$labels = array(
'name' => _x( 'Manufacturers', 'taxonomy general name', 'cultivate_base_theme' ),
'singular_name' => _x( 'Manufacturer', 'taxonomy singular name', 'cultivate_base_theme' ),
'search_items' => __( 'Search Manufacturers', 'cultivate_base_theme' ),
'all_items' => __( 'All Manufacturers', 'cultivate_base_theme' ),
'parent_item' => __( 'Parent Manufacturer', 'cultivate_base_theme' ),
'parent_item_colon' => __( 'Parent Manufacturer:', 'cultivate_base_theme' ),
'edit_item' => __( 'Edit Manufacturer', 'cultivate_base_theme' ),
'update_item' => __( 'Update Manufacturer', 'cultivate_base_theme' ),
'add_new_item' => __( 'Add New Manufacturer', 'cultivate_base_theme' ),
'new_item_name' => __( 'New Manufacturer Name', 'cultivate_base_theme' ),
'menu_name' => __( 'Manufacturers', 'cultivate_base_theme' ),
);$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'manufacturers' ),
);
register_taxonomy( 'manufacturers', array( 'vehicles' ), $args );
Is there a mistake in my code, or is this a bug in WordPress?
مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد
منبع: انجمن وردپرس