This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

PeteNC1

By: a guest on Feb 18th, 2013  |  syntax: PHP  |  size: 0.55 KB  |  views: 127  |  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. // Add post types of "Talk" and "Event"
  2. function nc_custom_post_types() {
  3.         register_post_type( 'talk',
  4.                 array(
  5.                         'labels' => array(
  6.                                 'name' => __( 'Talks' ),
  7.                                 'singular_name' => __( 'Talk' )
  8.                         ),
  9.                 'public' => true,
  10.                 'has_archive' => true,
  11.                 'taxonomies' => array('talktype', 'category'),
  12.                 )
  13.         );
  14.         register_post_type( 'event',
  15.                 array(
  16.                         'labels' => array(
  17.                                 'name' => __( 'Events' ),
  18.                                 'singular_name' => __( 'Event' )
  19.                         ),
  20.                 'public' => true,
  21.                 'has_archive' => true,
  22.                 )
  23.         );
  24. }
  25. add_action( 'init', 'nc_custom_post_types' );
clone this paste RAW Paste Data