johnbillion/extended-cpts

CPT taxonomies in admin_cols listed twice in dashboard

paulburgess opened this issue · 5 comments

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:

CleanShot 2020-12-07 at 15 08 24

Any idea what's up here?

Many thanks!

I can't immediately see a problem, but I will check it out.

@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?

Ah yes John, that was it - thank you!

I suppose technically Extended CPTs should handle this gracefully, but I'm not sure how it might do that.

I'll close this for now as it's an edge case.