I have set up 2 custom taxonomies for my posts: verdicts
and sponsors
.
The problem is that sponsors
do not get saved when publishing a post, it can only get saved when I check it in quick edit mode.
The code for my custom taxonomy is pretty basic, as you can see below.
Does anyone have any idea? Thanks!
<?php
// Register Custom Taxonomy
function custom_sponsors() {
$labels = array(
'name' => _x( 'Sponsors', 'Taxonomy General Name', 'text_domain' ),
// the rest of labels
);
$rewrite = array(
'slug' => 'sponsor',
'with_front' => true,
'hierarchical' => true,
);
$args2 = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'query_var' => 'sponsor',
'rewrite' => $rewrite,
);
register_taxonomy( 'sponsor', array( 'post' ), $args2 );
}
// Hook into the 'init' action
add_action( 'init', 'custom_sponsors', 0 );