0

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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