Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 21st, 2012  |  syntax: None  |  size: 1.19 KB  |  hits: 16  |  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. // Clubs Post Type
  3. add_action( 'init', 'codex_custom_init' );
  4. function codex_custom_init() {
  5.   $labels = array(
  6.     'name' => _x('Caravan Clubs', 'post type general name'),
  7.     'singular_name' => _x('Caravan Club', 'post type singular name'),
  8.     'add_new' => _x('Add New', 'cclub'),
  9.     'add_new_item' => __('Add New Caravan Club'),
  10.     'edit_item' => __('Edit Caravan Club'),
  11.     'new_item' => __('New Caravan Club'),
  12.     'all_items' => __('All Caravan Clubs'),
  13.     'view_item' => __('View Caravan Club'),
  14.     'search_items' => __('Search Caravan Clubs'),
  15.     'not_found' =>  __('No Caravan Clubs found'),
  16.     'not_found_in_trash' => __('No Caravan Clubs found in Trash'),
  17.     'parent_item_colon' => '',
  18.     'menu_name' => 'Caravan Clubs'
  19.  
  20.   );
  21.   $args = array(
  22.     'labels' => $labels,
  23.     'public' => true,
  24.     'publicly_queryable' => true,
  25.     'show_ui' => true,
  26.     'show_in_menu' => true,
  27.     'query_var' => true,
  28.     'rewrite' => array('slug' => 'club', 'with_front' => false),
  29.     'capability_type' => 'page',
  30.     'has_archive' => true,
  31.     'hierarchical' => false,
  32.     'menu_position' => 6,
  33.     'supports' => array( 'title', 'thumbnail', 'custom-fields')
  34.   );
  35.   register_post_type('cclub',$args);
  36. }