I have added a custom post and a custom taxonomy to my wordpress theme.
problem is , when im trying to add new taxonomy im getting a javascript error:
(the taxonomy is added but screen needs to be refreshed before i can see it)
f.responses[0] is undefined
[Break On This Error]
...or","")}}});f.children().css("backgroundColor","#f33")}return false});a("#submit...
This is my Code for adding the custom post and taxonomy
add_action('init', 'catalog_register');
function catalog_register() {
$labels=...;
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => true,
'menu_position' => 101,
'supports' => array('title','editor','thumbnail')
);
register_post_type( 'catalog' , $args );
}
here is my custom taxonomy code:
function create_catalog_taxonomies() {
$labels =array(...);
register_taxonomy("product_category", array("catalog"), array(
"hierarchical" => true,
"labels" => $labels,
'public' => true,
'query_var' => true,
'show_ui' => true,
'rewrite' => true
));
}
add_action( 'init', 'create_catalog_taxonomies', 0 );
what is wrong here ?
You have already registered post type
catalog, so just change the taxonomy registration to following syntax: