well I need do some things when new category is created,

I've been looking for which is the hook for this but I don't found nothing that's works.

If you can help me, thanks.

  • 1
    what did you already tried ? You say, "i don't found nothing that's works", so, what did you found ?
    – Benoti
    Nov 30 '16 at 15:27

The hook you want is create_{$taxonomy}.


add_action('create_category', 'my_theme_do_something', 10, 2);

function my_theme_do_something($term_id, $taxonomy_term_id){
    // do some things
  • Thanks, I was testing with that, but it was another error in my code that made it not work.
    – David
    Dec 1 '16 at 8:08

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