Email Subscriber CPT
// Register Custom Post Type
function subscribers_post_type() {
$labels = array(
'name' => 'Subscribers',
'singular_name' => 'Subscriber',
'menu_name' => 'Subscribers',
'parent_item_colon' => 'Parent Subscriber:',
'all_items' => 'All Subscribers',
'view_item' => 'View Subscriber',
'add_new_item' => 'Add New Subscriber',
'add_new' => 'Add Subscriber',
'edit_item' => 'Edit Subscriber',
'update_item' => 'Update Subscriber',
'search_items' => 'Search Subscriber',
'not_found' => 'Subscriber Not found',
'not_found_in_trash' => 'Subscriber Not found in Trash',
);
$args = array(
'label' => 'subscribers',
'description' => 'Post type for email subscriptions',
'labels' => $labels,
'supports' => array( 'title', ),
'hierarchical' => false,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => false,
'show_in_admin_bar' => true,
'menu_position' => 25,
'menu_icon' => 'dashicons-groups',
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => false,
'rewrite' => false,
'capability_type' => 'post',
);
register_post_type( 'subscribers', $args );
}
add_action( 'init', 'subscribers_post_type', 0 );