Advertisement
arnabkumar

custom taxonomies

Mar 21st, 2014
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1.     register_post_type( 'photo_gallery',
  2.             array(
  3.                 'labels' => array(
  4.                         'name' => __( 'Photo' ),
  5.                         'singular_name' => __( 'Photoes' ),
  6.                         'add_new' => __( 'Add New' ),
  7.                         'add_new_item' => __( 'Add New photo' ),
  8.                         'edit_item' => __( 'Edit photo' ),
  9.                         'new_item' => __( 'New photo' ),
  10.                         'view_item' => __( 'View photo' ),
  11.                         'not_found' => __( 'Sorry, we couldn\'t find the photo you are looking for.' )
  12.                 ),
  13.                 /*custom taxonomies*/
  14.                
  15.             'taxonomies' => array('category'),
  16.                  
  17.             'public' => true,
  18.             'publicly_queryable' => true,
  19.             'exclude_from_search' => true,
  20.             'menu_position' => 14,
  21.             'has_archive' => true,
  22.             'hierarchical' => true,
  23.             'capability_type' => 'post',
  24.             'rewrite' => array( 'slug' => 'slide' ),
  25.             'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail' )
  26.             )
  27.         );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement