Advertisement
cw17s0n

cpt

Jul 6th, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1. add_action( 'init', 'register_cpt_agents' );
  2. function register_cpt_agents() {
  3.     $labels = array(
  4.     'name' => _x( 'Agent Profiles', 'agents' ),
  5.     'singular_name' => _x( 'Agent Profile', 'agents' ),
  6.     'add_new' => _x( 'Add New', 'agents' ),
  7.     'add_new_item' => _x( 'Add New Agent Profile', 'agents' ),
  8.     'edit_item' => _x( 'Edit Agent Profile', 'agents' ),
  9.     'new_item' => _x( 'New Agent Profile', 'agents' ),
  10.     'view_item' => _x( 'View Agent Profile', 'agents' ),
  11.     'search_items' => _x( 'Search Agent Profiles', 'agents' ),
  12.     'not_found' => _x( 'No agent profiles found', 'agents' ),
  13.     'not_found_in_trash' => _x( 'No agent profiles found in Trash', 'agents' ),
  14.     'parent_item_colon' => _x( 'Parent Agent Profile:', 'agents' ),
  15.     'menu_name' => _x( 'Agent Profiles', 'agents' ),
  16. );
  17. $args = array(
  18.     'labels' => $labels,
  19.     'hierarchical' => false,
  20.     'supports' => array( 'title', 'author', 'editor', 'thumbnail' ),
  21.     'taxonomies' => array( 'page-category', 'regions', 'languages' ),
  22.     'public' => true,
  23.     'show_ui' => true,
  24.     'show_in_menu' => true,
  25.     'show_in_nav_menus' => true,
  26.     'publicly_queryable' => true,
  27.     'exclude_from_search' => false,
  28.     'has_archive' => true,
  29.     'query_var' => true,
  30.     'can_export' => true,
  31.     'rewrite' => true,
  32.     'capability_type' => 'post'
  33.     );
  34.     register_post_type( 'agents', $args );
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement