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 trying to build new wordpress plugin. Additional to the default wordpress categories box in the publishing screen of posts and pages, I want to add another box for custom taxonomy categories , How can I do that ?

share|improve this question
up vote 0 down vote accepted

All what you need to do is just pass required post types as array in the second parameter for register_taxonomy function call:

add_action( 'init', 'wpse8170_init' );
function wpse8170_init() {
    register_taxonomy( 'my-taxonomy', array( 'post' ), array(
    ) );

    // or call this function if your taxonomy is already registered
    register_taxonomy_for_object_type( 'my-taxonomy', 'page' );
share|improve this answer
Thanks Eugene, what if the taxonomies are registered in another plugin ? – Waseem Abu Senjer Jan 31 '13 at 10:00
@WaseemAbuSenjer I have updated my snippet. – Eugene Manuilov Jan 31 '13 at 10:23
thanks @Eugene Manuilov :) – Waseem Abu Senjer Jan 31 '13 at 10:56

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.