Advertisement
hmbashar

WordPress Custom Post

Jul 16th, 2015
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. register_post_type( 'student',
  2.     array(
  3.         'labels' => array(
  4.             'name' => __( 'Student', 'edu_text_domain' ),
  5.             'singular_name' => __( 'Student', 'edu_text_domain' ),
  6.             'add_new' => __( 'Add New Student', 'edu_text_domain' ),
  7.             'add_new_item' => __( 'Add New Student', 'edu_text_domain' ),
  8.             'edit_item'     => __('Edit Student Info', 'edu_text_domain'),
  9.             'view_item'     => __('View Student Info', 'edu_text_domain'),             
  10.             'not_found' => __( 'Sorry, we couldn\'t find the Student you are looking for.', 'edu_text_domain' )
  11.         ),
  12.         'public' => true,
  13.         'menu_icon' => 'dashicons-admin-users',
  14.         'supports' => array('title', 'custom-fields', 'thumbnail'),
  15.         'has_archive' => true,
  16.         'rewrite' => array('slug' => 'student'),
  17.         'capability_type' => 'page',
  18.     )
  19. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement