Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 4th, 2011  |  syntax: PHP  |  size: 0.47 KB  |  views: 176  |  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 Products Post Type
  2. function product_register() {
  3.         $args = array(
  4.                 'label' => __('Products'),
  5.                 'singular_label' => __('Product'),
  6.                 'public' => true,
  7.                 'show_ui' => true,
  8.                 'capability_type' => 'post',
  9.                 'hierarchical' => false,
  10.                 'rewrite' => array('slug'=>'products'),
  11.                 'supports' => array('title', 'editor', 'thumbnail', 'excerpt'),
  12.                 'show_in_nav_menus' => true
  13.         );
  14.  
  15.         register_post_type( 'product' , $args );
  16. }
  17. add_action('init', 'product_register');
clone this paste RAW Paste Data