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

Trying to make a system whereby a function is called upon an admin changing the taxonomy category (term - if i understand correcrtly) of a custom post type.

I thought the action tag "edit_category" would do this, but doesnt seem to work:

add_action('edit_category_form', 'myFunction');

Any ideas?


share|improve this question

'set_object_terms' is probably the hook you want. It gets passed the following: post_id, terms, term_taxonomy ids, taxonomy, append, old term_taxonomy ids.

You can use the post_id and taxonomy params to determine if its the post type and taxonomy you want to hook into, and then check if term_taxonomy_ids differs from the old term_taxonomy_ids to decide whether anything was changed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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