WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using this code. I cannot figure out what the heck is wrong with it?

$args = array(  
    'description',"My Desc",
    'slug' => "My Slug",
    'parent' => 0   
$result = wp_insert_term("Term1", "category", $args);

The result is that term is added, term_taxonomy is added. Slug is added. But the darn description is skipped.


term_id name            slug            term_group
1       Uncategorized   uncategorized   0
2       Blogroll        blogroll        0
3       Term1           my-slug         0


TT_id  T_id tax        description  parent  count
1      1    category                0           0
2      2    link_category           0           0
3      3    category                0           0
share|improve this question

closed as too localized by toscho Feb 13 '13 at 18:51

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

I was having the same problem the other day, due to a completely different typo ;)

$args = array(  
    'description' =>"My Desc",
    'slug' => "My Slug",
    'parent' => 0   
$result = wp_insert_term("Term1", "category", $args);

Note the corrected 'description' element in the $args array.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.