Communities
// Register Custom Post Type
function communities() {
$labels = array(
'name' => _x( 'Communities', 'Post Type General Name', 'stateview' ),
'singular_name' => _x( 'Community', 'Post Type Singular Name', 'stateview' ),
'menu_name' => __( 'Communities', 'stateview' ),
'name_admin_bar' => __( 'Communities', 'stateview' ),
'archives' => __( 'Community Archives', 'stateview' ),
'parent_item_colon' => __( 'Parent Community:', 'stateview' ),
'all_items' => __( 'AllCommunities', 'stateview' ),
'add_new_item' => __( 'Add New Community', 'stateview' ),
'add_new' => __( 'Add New', 'stateview' ),
'new_item' => __( 'New Community', 'stateview' ),
'edit_item' => __( 'Edit Community', 'stateview' ),
'update_item' => __( 'Update Community', 'stateview' ),
'view_item' => __( 'View Community', 'stateview' ),
'search_items' => __( 'Search Community', 'stateview' ),
'not_found' => __( 'Not found', 'stateview' ),
'not_found_in_trash' => __( 'Not found in Trash', 'stateview' ),
'featured_image' => __( 'Featured Image', 'stateview' ),
'set_featured_image' => __( 'Set featured image', 'stateview' ),
'remove_featured_image' => __( 'Remove featured image', 'stateview' ),
'use_featured_image' => __( 'Use as featured image', 'stateview' ),
'insert_into_item' => __( 'Insert into item', 'stateview' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'stateview' ),
'items_list' => __( 'Communities list', 'stateview' ),
'items_list_navigation' => __( 'Communities list navigation', 'stateview' ),
'filter_items_list' => __( 'Filter communities list', 'stateview' ),
);
$args = array(
'label' => __( 'Community', 'stateview' ),
'description' => __( 'Stateview's communities', 'stateview' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'custom-fields', ),
'taxonomies' => array( 'status' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-admin-multisite',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'communities', $args );
}
add_action( 'init', 'communities', 0 );