natehawkes

Client CPT

Jul 17th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.10 KB | None | 0 0
  1. <?php
  2. add_action('init', 'ccd_clients');
  3.  
  4. function ccd_clients() {
  5.  
  6.     $labels = array(
  7.         'name' => _x('Clients', 'post type general name'),
  8.         'singular_name' => _x('Client', 'post type singular name'),
  9.         'add_new' => _x('Add New', 'ccd_portfolio item'),
  10.         'add_new_item' => __('Add New Client'),
  11.         'edit_item' => __('Edit Client'),
  12.         'new_item' => __('New Client'),
  13.         'view_item' => __('View Client'),
  14.         'search_items' => __('Search Clients'),
  15.         'not_found' =>  __('Nothing found'),
  16.         'not_found_in_trash' => __('Nothing found in Trash'),
  17.         'parent_item_colon' => ''
  18.     );
  19.  
  20.     $args = array(
  21.         'labels' => $labels,
  22.         'public' => true,
  23.         'publicly_queryable' => true,
  24.         'show_ui' => true,
  25.         'query_var' => true,
  26.         'menu_icon' => get_stylesheet_directory_uri() . '/images/icons/plugins/clients.png',
  27.         'capability_type' => 'post',
  28.         'hierarchical' => false,
  29.         'menu_position' => null,
  30.         'supports' => array('title', 'editor', 'excerpt'),
  31.         'can_export' => true,
  32.         'show_in_menu' => true,
  33.         'has_archive' => false
  34.       );
  35.  
  36.     register_post_type( 'clients' , $args );
  37.     flush_rewrite_rules();
  38. }
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment