Nano
if ( ! function_exists('blog_post_type') ) {
// Register Custom Post Type
function blog_post_type() {
$labels = array(
'name' => _x( 'Blogs', 'Post Type General Name', 'nano' ),
'singular_name' => _x( 'Blog', 'Post Type Singular Name', 'nano' ),
'menu_name' => __( 'Blog', 'nano' ),
'name_admin_bar' => __( 'Blog', 'nano' ),
'parent_item_colon' => __( 'Parent Blog Post:', 'nano' ),
'all_items' => __( 'All Blog Posts', 'nano' ),
'add_new_item' => __( 'Add New Blog Post', 'nano' ),
'add_new' => __( 'Add Blog Post', 'nano' ),
'new_item' => __( 'New Blog Post', 'nano' ),
'edit_item' => __( 'Edit Blog Post', 'nano' ),
'update_item' => __( 'Update Blog Post', 'nano' ),
'view_item' => __( 'View Blog Post', 'nano' ),
'search_items' => __( 'Search Blog Post', 'nano' ),
'not_found' => __( 'Not found', 'nano' ),
'not_found_in_trash' => __( 'Not found in Trash', 'nano' ),
);
$args = array(
'label' => __( 'blog', 'nano' ),
'description' => __( 'Blog posts', 'nano' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'query_var' => 'blog',
'capability_type' => 'post',
);
register_post_type( 'blog', $args );
}
// Hook into the 'init' action
add_action( 'init', 'blog_post_type', 0 );
}