Videos Post Type
Videos Post Type
if ( ! function_exists('custom_post_type') ) { // Register Custom Post Type function custom_post_type() { $labels = array( 'name' => _x( 'Videos', 'Post Type General Name', 'shoptube' ), 'singular_name' => _x( 'Video', 'Post Type Singular Name', 'shoptube' ), 'menu_name' => __( 'Videos', 'shoptube' ), 'parent_item_colon' => __( 'Parent Item:', 'shoptube' ), 'all_items' => __( 'All Videos', 'shoptube' ), 'view_item' => __( 'View Video', 'shoptube' ), 'add_new_item' => __( 'Add New Video', 'shoptube' ), 'add_new' => __( 'Add New', 'shoptube' ), 'edit_item' => __( 'Edit Video', 'shoptube' ), 'update_item' => __( 'Update Video', 'shoptube' ), 'search_items' => __( 'Search Videos', 'shoptube' ), 'not_found' => __( 'Video Not found', 'shoptube' ), 'not_found_in_trash' => __( 'No Videos found in Trash', 'shoptube' ), ); $rewrite = array( 'slug' => 'videos', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'post_type', 'shoptube' ), 'description' => __( 'Our video posts', 'shoptube' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ), 'taxonomies' => array( 'video_category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'menu_icon' => '', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'post', ); register_post_type( 'post_type', $args ); } // Hook into the 'init' action add_action( 'init', 'custom_post_type', 0 ); }