Kontakti
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Contacts', 'Post Type General Name', 'unist-contacts' ),
'singular_name' => _x( 'Contact', 'Post Type Singular Name', 'unist-contacts' ),
'menu_name' => __( 'Contacts', 'unist-contacts' ),
'name_admin_bar' => __( 'Contact', 'unist-contacts' ),
'parent_item_colon' => __( 'Parent Contact:', 'unist-contacts' ),
'all_items' => __( 'All Contacts', 'unist-contacts' ),
'add_new_item' => __( 'Add New Contact', 'unist-contacts' ),
'add_new' => __( 'Add New', 'unist-contacts' ),
'new_item' => __( 'New Contact', 'unist-contacts' ),
'edit_item' => __( 'Edit Contact', 'unist-contacts' ),
'update_item' => __( 'Update Contact', 'unist-contacts' ),
'view_item' => __( 'View Contact', 'unist-contacts' ),
'search_items' => __( 'Search Contact', 'unist-contacts' ),
'not_found' => __( 'Not found', 'unist-contacts' ),
'not_found_in_trash' => __( 'Not found in Trash', 'unist-contacts' ),
);
$args = array(
'label' => __( 'contact', 'unist-contacts' ),
'description' => __( 'Contacts', 'unist-contacts' ),
'labels' => $labels,
'supports' => array( 'title', 'author', 'comments', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => false,
'capability_type' => 'post',
);
register_post_type( 'contact', $args );
}
// Hook into the 'init' action
add_action( 'init', 'custom_post_type', 0 );