Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am looking to add a new admin menu item from my plugin call "Tickers" under "Post", with the link similar to "Tags", but point to

/wp-admin/edit-tags.php?taxonomy=tickers

What I have so far is

add_action('admin_menu', array($this,'admin_menu'));
function admin_menu () {
     add_options_page();    
}

I am not sure what are the right parameters to pass to add_options_page. Any help would be much appreciated.

Edit

Answer provided below lead me to http://themergency.com/generators/wordpress-custom-taxonomy/, which can generate the custom taxonomy functions for you.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The taxonomy admin page will be handled by WordPress once you register your custom taxonomy.

add_action( 'init', 'create_ticker_taxonomies', 0 );

//create two taxonomies, genres and writers for the post type "book"
function create_ticker_taxonomies() {

  // Add new taxonomy, make it non-hierarchical (like 'tags')
  $labels = array(
    'name' => _x( 'Tickers', 'taxonomy general name' ),
    ...
  );    

  register_taxonomy('ticker',array('post'), array(
    'hierarchical' => false,
    'labels' => $labels,
    'show_ui' => true,
    'query_var' => true,
  ));
}

The full options available to you regardin the taxonomy and its labels can be found on the Codex Page.

share|improve this answer
    
Thanks for you answer. Works great. –  ltfishie Apr 18 '12 at 16:17

Your Answer

 
discard

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.