I have just registered a new Custom Taxonomy in WordPress (as per the docs). Here is a copy of the code in functions.php
for reference:
function people_init() {
// create a new taxonomy
register_taxonomy(
'people',
'post',
array(
'label' => __( 'People' ),
'rewrite' => array( 'slug' => 'person' ),
'capabilities' => array(
'assign_terms' => 'edit_guides',
'edit_terms' => 'publish_guides'
)
)
);
}
add_action( 'init', 'people_init' );
As you can see in the image below, the Taxonomy appears within left-hand navigation but when my (admin) user clicks on the option I am displayed with an You are not allowed to edit this item. error:
Can anyone suggest why this may be?
Almost as soon as I posted this I realised it is the
capabilities
array. Removing this, so that it reverts to the default allows access as intended.After further investigation I found that the following was the best settings to get this functioning correctly:
Is there a reason this Taxonomy isn’t appearing within left-hand navigation when my (admin) user clicks on the option?