TCB Themes
this cpt is to add theme section to thecodeblock
// Register Custom Post Type function theme_post_type() { $labels = array( 'name' => _x( 'Themes', 'Post Type General Name', 'the_code_block' ), 'singular_name' => _x( 'Theme', 'Post Type Singular Name', 'the_code_block' ), 'menu_name' => __( 'Themes', 'the_code_block' ), 'name_admin_bar' => __( 'Themes', 'the_code_block' ), 'parent_item_colon' => __( 'Parent Item:', 'the_code_block' ), 'all_items' => __( 'All Items', 'the_code_block' ), 'add_new_item' => __( 'Add New theme', 'the_code_block' ), 'add_new' => __( 'Add New', 'the_code_block' ), 'new_item' => __( 'New theme', 'the_code_block' ), 'edit_item' => __( 'Edit theme', 'the_code_block' ), 'update_item' => __( 'Update theme', 'the_code_block' ), 'view_item' => __( 'View theme', 'the_code_block' ), 'search_items' => __( 'Search theme', 'the_code_block' ), 'not_found' => __( 'Not found', 'the_code_block' ), 'not_found_in_trash' => __( 'Not found in Trash', 'the_code_block' ), ); $rewrite = array( 'slug' => 'themes', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'tcb_theme', 'the_code_block' ), 'description' => __( 'thecodeblock themes', 'the_code_block' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-schedule', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'tcb_theme', $args ); } // Hook into the 'init' action add_action( 'init', 'theme_post_type', 0 );