Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 6th, 2011  |  syntax: PHP  |  size: 1.11 KB  |  views: 117  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. add_action('init', 'campaign_register');
  4.  
  5. function campaign_register() {
  6.  
  7.         $labels = array(
  8.                 'name' => _x('My Campaigns', 'post type general name'),
  9.                 'singular_name' => _x('Campaign Item', 'post type singular name'),
  10.                 'add_new' => _x('Add New', 'campaign item'),
  11.                 'add_new_item' => __('Add New Campaign Item'),
  12.                 'edit_item' => __('Edit Campaign Item'),
  13.                 'new_item' => __('New Campaign Item'),
  14.                 'view_item' => __('View Campaign Item'),
  15.                 'search_items' => __('Search Campaigns'),
  16.                 'not_found' =>  __('Nothing found'),
  17.                 'not_found_in_trash' => __('Nothing found in Trash'),
  18.                 'parent_item_colon' => ''
  19.         );
  20.  
  21.         $args = array(
  22.                 'labels' => $labels,
  23.                 'public' => true,
  24.                 'publicly_queryable' => true,
  25.                 'show_ui' => true,
  26.                 'query_var' => true,
  27.                 'menu_icon' => get_stylesheet_directory_uri() . '/images/icon.gif',
  28.                 'rewrite' => true,
  29.                 'capability_type' => 'page',
  30.                 'hierarchical' => false,
  31.                 'menu_position' => null,
  32.                 'supports' => array('title','editor','thumbnail')
  33.           );
  34.  
  35.         register_post_type( 'campaign' , $args );
  36. }
  37.  
  38. register_taxonomy("Product Categories", array("campaign"));
  39.  
  40. ?>