Advertisement
sabbirshouvo

Custom Post Type Blood Blog

Mar 31st, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. /*Register Blood Blog*/
  2. function mcp_blood_blog() {
  3.     $labels = array(
  4.         'name'               => _x( 'Blood Blog', 'post type general name' ),
  5.         'singular_name'      => _x( 'Blood Blog', 'post type singular name' ),
  6.         'add_new'            => _x( 'Add New', 'Blood Blog' ),
  7.         'add_new_item'       => __( 'Add New Blog' ),
  8.         'edit_item'          => __( 'Edit' ),
  9.         'new_item'           => __( 'New Blood Blog' ),
  10.         'all_items'          => __( 'Blood Blog' ),
  11.         'view_item'          => __( 'View Blog' ),
  12.         'search_items'       => __( 'Search Blog' ),
  13.         'not_found'          => __( 'No Blog Found' ),
  14.         'not_found_in_trash' => __( 'No Blog Found Trash' ),
  15.         'parent_item_colon'  => '',
  16.         'menu_name'          => 'Blood Blog'
  17.     );
  18.     $args = array(
  19.         'labels'        => $labels,
  20.         'description'   => 'Insert A Blood Blog',
  21.         'public'        => true,
  22.         'menu_position' => 5,
  23.         'menu_icon'     => 'dashicons-heart',
  24.         'supports'      => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments', 'author' ),
  25.         'has_archive'   => true,
  26.         'hierarchical'  => false,
  27.         'rewrite'       => array('slug' => 'blood/blog','with_front' => true,'feeds' => true,),
  28.         'query_var'     => true,
  29.         'publicly_queryable'    => true,
  30.         'public'                => true,
  31.         'show_in_admin_bar' => true,
  32.         'show_in_nav_menus' => false,
  33.         'capability_type' => 'post',
  34.         '_edit_link' => 'post.php?post=%d' ,
  35.     );
  36.     register_post_type( 'blood-blog', $args );
  37. }
  38. add_action( 'init', 'mcp_blood_blog' );
  39. /*End Blood Blog*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement