function custom_resource_type() {
$labels = array(
'name' => _x( 'Resources', 'Post Type General Name', 'gucherry-blog' ),
'singular_name' => _x( 'Resource', 'Post Type Singular Name', 'gucherry-blog' ),
'menu_name' => __( 'Resources', 'gucherry-blog' ),
'parent_item_colon' => __( 'Parent Resource', 'gucherry-blog' ),
'all_items' => __( 'All Resources', 'gucherry-blog' ),
'view_item' => __( 'View Resource', 'gucherry-blog' ),
'add_new_item' => __( 'Add New Resource', 'gucherry-blog' ),
'add_new' => __( 'Add Resource', 'gucherry-blog' ),
'edit_item' => __( 'Edit Resource', 'gucherry-blog' ),
'update_item' => __( 'Update Resource', 'gucherry-blog' ),
'search_items' => __( 'Search Resource', 'gucherry-blog' ),
'not_found' => __( 'Not Found', 'gucherry-blog' ),
'not_found_in_trash' => __( 'Not found in Trash', 'gucherry-blog' ),
);
$args = array(
'label' => __( 'resources', 'gucherry-blog' ),
'description' => __( 'Resource for software products and online', 'gucherry-blog' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
'taxonomies' => array( '' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'menu_icon' => 'dashicons-admin-site-alt2',
'capability_type' => 'page',
);
register_post_type( 'resources', $args );
$resource_cats = array(
'name' => _x( 'Resource Categories', 'taxonomy general name', 'gucherry-blog' ),
'singular_name' => _x( 'Resource Category', 'taxonomy singular name', 'gucherry-blog' ),
'search_items' => __( 'Search Resource Categories', 'gucherry-blog' ),
'all_items' => __( 'All Resource', 'gucherry-blog' ),
'parent_item' => __( 'Parent Resource', 'gucherry-blog' ),
'parent_item_colon' => __( 'Parent Resource:', 'gucherry-blog' ),
'edit_item' => __( 'Edit Resource', 'gucherry-blog' ),
'update_item' => __( 'Update Resource', 'gucherry-blog' ),
'add_new_item' => __( 'Add New Resource', 'gucherry-blog' ),
'new_item_name' => __( 'New Resource', 'gucherry-blog' ),
'menu_name' => __( 'Resource Categories', 'gucherry-blog' ),
);
register_taxonomy('resource_categories',array('resources'), array(
'hierarchical' => true,
'labels' => $resource_cats,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'resource' ),
));
}