WP Templates
// Register Custom Post Type
function wp_heavy_templates() {
$labels = array(
'name' => _x( 'Heavy Templates', 'Post Type General Name', 'heavy-lang-pro' ),
'singular_name' => _x( 'WP Template', 'Post Type Singular Name', 'heavy-lang-pro' ),
'menu_name' => __( 'WP Templates', 'heavy-lang-pro' ),
'name_admin_bar' => __( 'WP Templates', 'heavy-lang-pro' ),
'archives' => __( 'WP Template Archives', 'heavy-lang-pro' ),
'attributes' => __( 'WP Template Attributes', 'heavy-lang-pro' ),
'parent_item_colon' => __( 'Parent Item:', 'heavy-lang-pro' ),
'all_items' => __( 'All templates', 'heavy-lang-pro' ),
'add_new_item' => __( 'Add New Template', 'heavy-lang-pro' ),
'add_new' => __( 'Add New', 'heavy-lang-pro' ),
'new_item' => __( 'New template', 'heavy-lang-pro' ),
'edit_item' => __( 'Edit template', 'heavy-lang-pro' ),
'update_item' => __( 'Update template', 'heavy-lang-pro' ),
'view_item' => __( 'View template', 'heavy-lang-pro' ),
'view_items' => __( 'View templates', 'heavy-lang-pro' ),
'search_items' => __( 'Search template', 'heavy-lang-pro' ),
'not_found' => __( 'Not found', 'heavy-lang-pro' ),
'not_found_in_trash' => __( 'Not found in Trash', 'heavy-lang-pro' ),
'featured_image' => __( 'Featured Image', 'heavy-lang-pro' ),
'set_featured_image' => __( 'Set featured image', 'heavy-lang-pro' ),
'remove_featured_image' => __( 'Remove featured image', 'heavy-lang-pro' ),
'use_featured_image' => __( 'Use as featured image', 'heavy-lang-pro' ),
'insert_into_item' => __( 'Insert into item', 'heavy-lang-pro' ),
'uploaded_to_this_item' => __( 'Uploaded to this template', 'heavy-lang-pro' ),
'items_list' => __( 'Items list', 'heavy-lang-pro' ),
'items_list_navigation' => __( 'Items list navigation', 'heavy-lang-pro' ),
'filter_items_list' => __( 'Filter items list', 'heavy-lang-pro' ),
);
$args = array(
'label' => __( 'WP Template', 'heavy-lang-pro' ),
'description' => __( 'WP Templates', 'heavy-lang-pro' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'revisions' ),
'hierarchical' => false,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-open-folder',
'show_in_admin_bar' => false,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'show_in_rest' => true,
);
register_post_type( 'wp_heavy_template', $args );
}
add_action( 'init', 'wp_heavy_templates', 0 );