Companies
// Register Custom Post Type
function companies() {
$labels = array(
'name' => _x( 'Companies', 'Post Type General Name', 'vg' ),
'singular_name' => _x( 'Company', 'Post Type Singular Name', 'vg' ),
'menu_name' => __( 'Companies', 'vg' ),
'parent_item_colon' => __( 'Parent Company:', 'vg' ),
'all_items' => __( 'All Companies', 'vg' ),
'view_item' => __( 'View Company', 'vg' ),
'add_new_item' => __( 'Add New Company', 'vg' ),
'add_new' => __( 'Add New', 'vg' ),
'edit_item' => __( 'Edit Company', 'vg' ),
'update_item' => __( 'Update Company', 'vg' ),
'search_items' => __( 'Search Companies', 'vg' ),
'not_found' => __( 'Not found', 'vg' ),
'not_found_in_trash' => __( 'Not found in Trash', 'vg' ),
);
$args = array(
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', ),
'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' => 'dashicons-businessman',
'can_export' => false,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'company', $args );
}
// Hook into the 'init' action
add_action( 'init', 'companies', 0 );