Advertisement
Guest User

Untitled

a guest
Apr 6th, 2011
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement