CPT Groups for Adventure 365
A custom post type for groups in adventure 365
if ( ! function_exists('post_type_groups') ) { // Register Custom Post Type function post_type_groups() { $labels = array( 'name' => _x( 'Groups', 'Post Type General Name', 'Groups' ), 'singular_name' => _x( 'Group', 'Post Type Singular Name', 'Groups' ), 'menu_name' => __( 'Adventure Groups', 'Groups' ), 'parent_item_colon' => __( 'Parent Item:', 'Groups' ), 'all_items' => __( 'All Items', 'Groups' ), 'view_item' => __( 'View Item', 'Groups' ), 'add_new_item' => __( 'Add New Group', 'Groups' ), 'add_new' => __( 'Add New', 'Groups' ), 'edit_item' => __( 'Edit Group', 'Groups' ), 'update_item' => __( 'Update Group', 'Groups' ), 'search_items' => __( 'Search Groups', 'Groups' ), 'not_found' => __( 'Sorry, No Group found.', 'Groups' ), 'not_found_in_trash' => __( 'Sorry, No Group found.', 'Groups' ), ); $rewrite = array( 'slug' => 'groups', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'post_type_groups', 'Groups' ), 'description' => __( 'A custom post type for Groups', 'Groups' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ), 'taxonomies' => array( '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' => 'http://icons.iconarchive.com/icons/vargas21/aquave-metal/64/Group-icon.png', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'query_var' => 'groups', 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'post_type_groups', $args ); } // Hook into the 'init' action add_action( 'init', 'post_type_groups', 0 ); }