ovako sam ga registrovao
Code:
register_taxonomy( 'news', 'post', array(
'label' => 'News',
'add_new' => _x( 'Add New', 'News' ),
'add_new_item' => 'Add New News',
'edit_item' => 'Edit News',
'new_item' => 'New News',
'view_item' => 'View News',
'search_items' => 'Search News',
'not_found_in_trash' => 'No News found in Trash',
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'hierarchical' => true
) );
register_taxonomy( 'news', 'post', array(
'label' => 'News',
'add_new' => _x( 'Add New', 'News' ),
'add_new_item' => 'Add New News',
'edit_item' => 'Edit News',
'new_item' => 'New News',
'view_item' => 'View News',
'search_items' => 'Search News',
'not_found_in_trash' => 'No News found in Trash',
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'hierarchical' => true
) );
a u njega sam potom pokusao ubaciti novu kategoriju i nisam uspeo? uspem da ubacim u "Categories" ali kada ja napravim custom taxonomy u njega nikako ne uspevam?
Code:
wp_insert_term( 'News', 'news',
array(
'description' => 'Services page',
'slug' => 'services-category'
)
);
wp_insert_term( 'News', 'news',
array(
'description' => 'Services page',
'slug' => 'services-category'
)
);
naravno posle oba puta sam koristio add_action();
Hvala unapred na pomoci :)