CPT taxonomies in admin_cols listed twice in dashboard
paulburgess opened this issue · 5 comments
paulburgess commented
Hi, I'm using a parent/child theme set up, CPTS are registered in the child theme.
register_extended_post_type( 'music', array(
'menu_icon' => 'dashicons-format-audio',
'has_archive' => true,
'taxonomies' => array('post_tag'),
'show_in_rest' => false,
'admin_cols' => array(
'music_cat' => array(
'title' => 'Catgory',
'taxonomy' => 'music-category',
),
'music_artist' => array(
'title' => 'Artist',
'taxonomy' => 'music-artist',
),
),
),
array(
'singular' => 'Music',
'plural' => 'Music',
)
);
When the taxonomies are shown in the admin area, they are listed twice:
Any idea what's up here?
Many thanks!
johnbillion commented
I can't immediately see a problem, but I will check it out.
johnbillion commented
@paulburgess I've been testing this and the only way I can reproduce it is if I register the post type twice, by calling register_extended_post_type()
twice.
Can you check your code and see if this is the case please?
paulburgess commented
Ah yes John, that was it - thank you!
johnbillion commented
I suppose technically Extended CPTs should handle this gracefully, but I'm not sure how it might do that.
johnbillion commented
I'll close this for now as it's an edge case.