Advertisement
SchuminWeb

Schumin Web custom post types

Dec 23rd, 2013
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.43 KB | None | 0 0
  1. <?php add_action( 'init', 'create_my_post_types' );
  2.  
  3. function create_my_post_types() {
  4.     register_post_type( 'fire_alarms',
  5.         array(
  6.             'labels' => array(
  7.                 'name' => __( 'Fire Alarms' ),
  8.                 'singular_name' => __( 'Fire Alarm' ),
  9.                 'add_new_item' => __( 'Add New Fire Alarm' ),
  10.                 'edit_item' => __( 'Edit Fire Alarm' )
  11.             ),
  12.             'show_ui' => true,
  13.             'public' => true,
  14.             'has_archive' => true,
  15.             'supports' => array('title', 'editor', 'author', 'custom-fields', 'thumbnail', 'comments', 'revisions', 'trackbacks'),
  16.         )
  17.     );
  18.     register_post_type( 'photo_features',
  19.         array(
  20.             'labels' => array(
  21.                 'name' => __( 'Photo Features' ),
  22.                 'singular_name' => __( 'Photo Feature' ),
  23.                 'add_new_item' => __( 'Add New Photo Feature' ),
  24.                 'edit_item' => __( 'Edit Photo Feature' )
  25.             ),
  26.             'show_ui' => true,
  27.             'public' => true,
  28.             'has_archive' => true,
  29.             'supports' => array('title', 'editor', 'author', 'custom-fields', 'thumbnail', 'comments', 'revisions', 'trackbacks'),
  30.         )
  31.     );
  32.     register_post_type( 'quote_articles',
  33.         array(
  34.             'labels' => array(
  35.                 'name' => __( 'Quote Articles' ),
  36.                 'singular_name' => __( 'Quote Article' ),
  37.                 'add_new_item' => __( 'Add New Quote Article' ),
  38.                 'edit_item' => __( 'Edit Quote Article' )
  39.             ),
  40.             'show_ui' => true,
  41.             'public' => true,
  42.             'has_archive' => true,
  43.             'supports' => array('title', 'editor', 'author', 'custom-fields', 'thumbnail', 'comments', 'revisions', 'trackbacks'),
  44.         ),
  45.     $args = array(
  46.         'publicly_queryable' => true,
  47.         'query_var' => true,
  48.         'rewrite' => false,
  49.         )
  50.     );
  51.     register_post_type( 'site_updates',
  52.         array(
  53.             'labels' => array(
  54.                 'name' => __( 'Site Updates' ),
  55.                 'singular_name' => __( 'Site Update' ),
  56.                 'add_new_item' => __( 'Add New Site Update' ),
  57.                 'edit_item' => __( 'Edit Site Update' )
  58.             ),
  59.             'show_ui' => true,
  60.             'public' => true,
  61.             'has_archive' => true,
  62.             'supports' => array('title', 'editor', 'author', 'custom-fields', 'revisions'),
  63.         )
  64.     );
  65.     register_post_type( 'splash_photos',
  66.         array(
  67.             'labels' => array(
  68.                 'name' => __( 'Splash Photos' ),
  69.                 'singular_name' => __( 'Splash Photo' ),
  70.                 'add_new_item' => __( 'Add New Splash Photo' ),
  71.                 'edit_item' => __( 'Edit Splash Photo' )
  72.             ),
  73.             'show_ui' => true,
  74.             'public' => true,
  75.             'has_archive' => true,
  76.             'supports' => array('title', 'editor', 'author', 'custom-fields', 'thumbnail', 'comments', 'revisions', 'trackbacks'),
  77.         )
  78.     );
  79. }
  80. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement