Taxonomies don’t show up on in the dashboard page for a custom post type in wordpress 5.22

In wordpress 5.22 , After creating a custom post type like:

function create_products_cpt(){
register_post_type( ‘product’,
array(
‘labels’ => $labels,
‘public’ => true,
‘supports’ => array(
‘title’,
‘editor’,
‘thumbnail’,
‘custom-fields’
),
‘taxonomies’=>[‘product-category’],
‘register_meta_box_cb’ => ‘register_metaboxes’,
‘show_in_rest’ => true
)
);

register_taxonomy(‘product-category’,’product’,array(
‘hierarchical’=>true,
‘label’=>’product categories’
));

}
add_action( ‘init’, ‘create_products_cpt’ );

I am able to create post types and categories inside the taxonomy from the dashboard, but it is impossible to mark a specific post of that post type as belonging to any of the categories, since the selector just doesn’t appear.
I double-checked on an older version of wordpress (4.89) and it does work as intended, selector and all.
What could be the issue here?

Read more here:: Taxonomies don’t show up on in the dashboard page for a custom post type in wordpress 5.22

Leave a Reply

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