if ( ! function_exists('cmtools_post_type') ) { // Register Custom Post Type function cmtools_post_type() { $labels = array( 'name' => _x( 'Tools', 'Post Type General Name', 'cmtools' ), 'singular_name' => _x( 'Tool', 'Post Type Singular Name', 'cmtools' ), 'menu_name' => __( 'Tools', 'cmtools' ), 'name_admin_bar' => __( 'Tool', 'cmtools' ), 'archives' => __( 'Tools Archive', 'cmtools' ), 'attributes' => __( 'Tool Attributes', 'cmtools' ), 'parent_item_colon' => __( 'Parent Item:', 'cmtools' ), 'all_items' => __( 'All Tools', 'cmtools' ), 'add_new_item' => __( 'Add New Tool', 'cmtools' ), 'add_new' => __( 'New Tool', 'cmtools' ), 'new_item' => __( 'New Tool', 'cmtools' ), 'edit_item' => __( 'Edit Tool', 'cmtools' ), 'update_item' => __( 'Update Tool', 'cmtools' ), 'view_item' => __( 'View Tool', 'cmtools' ), 'view_items' => __( 'View Tools', 'cmtools' ), 'search_items' => __( 'Search a Tool', 'cmtools' ), 'not_found' => __( 'No Tools found', 'cmtools' ), 'not_found_in_trash' => __( 'No tools found in Trash', 'cmtools' ), 'featured_image' => __( 'Featured Tool Image', 'cmtools' ), 'set_featured_image' => __( 'Set featured image', 'cmtools' ), 'remove_featured_image' => __( 'Remove featured image', 'cmtools' ), 'use_featured_image' => __( 'Use as featured image', 'cmtools' ), 'insert_into_item' => __( 'Insert into item', 'cmtools' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'cmtools' ), 'items_list' => __( 'Tools list', 'cmtools' ), 'items_list_navigation' => __( 'Tools list navigation', 'cmtools' ), 'filter_items_list' => __( 'Filter tools list', 'cmtools' ), ); $args = array( 'label' => __( 'Tool', 'cmtools' ), 'description' => __( 'Tools for creativity in business', 'cmtools' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'custom-fields' ), 'taxonomies' => array( 'cmtools_categories' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 20, 'menu_icon' => 'dashicons-admin-tools', '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( 'tools', $args ); } add_action( 'init', 'cmtools_post_type', 0 ); }