User Upload PDF Post Type
Post Type to organize the articles what are submited by the users
// Register Custom Post Type function custom_post_type() { $labels = array( 'name' => _x( 'Articles', 'Post Type General Name', 'turing_press' ), 'singular_name' => _x( 'Article', 'Post Type Singular Name', 'turing_press' ), 'menu_name' => __( 'Submissions', 'turing_press' ), 'parent_item_colon' => __( 'Parent Article:', 'turing_press' ), 'all_items' => __( 'All Articles', 'turing_press' ), 'view_item' => __( 'View Article', 'turing_press' ), 'add_new_item' => __( 'Add New Article', 'turing_press' ), 'add_new' => __( 'Add New', 'turing_press' ), 'edit_item' => __( 'Edit Article', 'turing_press' ), 'update_item' => __( 'Update Article', 'turing_press' ), 'search_items' => __( 'Search Article', 'turing_press' ), 'not_found' => __( 'Not found', 'turing_press' ), 'not_found_in_trash' => __( 'Not found in Trash', 'turing_press' ), ); $capabilities = array( 'edit_post' => 'edit_post', 'read_post' => 'read_post', 'delete_post' => 'delete_post', 'edit_posts' => 'edit_posts', 'publish_posts' => 'publish_posts', ); $args = array( 'label' => __( 'user_article', 'turing_press' ), 'description' => __( 'post type to organize the submitted articles', 'turing_press' ), 'labels' => $labels, 'supports' => array( 'title', 'author', ), 'taxonomies' => array( 'journals' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 20, 'menu_icon' => 'dashicons-welcome-learn-more', 'can_export' => true, 'has_archive' => false, 'exclude_from_search' => true, 'publicly_queryable' => true, 'capabilities' => $capabilities, ); register_post_type( 'user_article', $args ); } // Hook into the 'init' action add_action( 'init', 'custom_post_type', 0 );