Advertisement
hmbashar

Custompost type (CPT) Register

Jun 25th, 2019
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1.         register_post_type( 'videos',
  2.                 array(
  3.                         'labels' => array(
  4.                                 'name' => __( 'Videos' ),
  5.                                 'singular_name' => __( 'Video' ),
  6.                                 'add_new' => __( 'Add New Video' ),
  7.                                 'add_new_item' => __( 'Add New Videos' ),
  8.                                 'edit_item' => __( 'Edit Videos' ),
  9.                                 'new_item' => __( 'New Videos' ),
  10.                                 'view_item' => __( 'View Videos' ),
  11.                                 'not_found' => __( 'Sorry, we couldn\'t find the Videos you are looking for.' ),
  12.                                 'featured_image'  => __('Video Thumbnail'),
  13.                                 'set_featured_image'  => __('Set Thumbnail Image'),
  14.                                 'remove_featured_image' => __('Remove Thumbnail Image'),
  15.                                 'use_featured_image'    => __('Use Thumbnail Image'),
  16.                         ),
  17.                 'public' => true,
  18.                 'publicly_queryable' => true,
  19.                 'exclude_from_search' => true,
  20.                 'menu_position' => 14,
  21.                 'has_archive' => false,
  22.                 'hierarchical' => false,
  23.                 'menu_icon'   => 'dashicons-video-alt2',
  24.                 'capability_type' => 'page',
  25.                 'rewrite' => array( 'slug' => 'videos' ),
  26.                 'supports' => array( 'title', 'thumbnail' )
  27.                 )
  28.         );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement