Dompierre – Contacts Custom Post
// Register Custom Post Type
function contact_post_type() {
$labels = array(
'name' => _x( 'Contacts', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Contact', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Contacts', 'text_domain' ),
'name_admin_bar' => __( 'Contacts', 'text_domain' ),
'archives' => __( 'Archive des contacts', 'text_domain' ),
'attributes' => __( 'Attributs des contacts', 'text_domain' ),
'parent_item_colon' => __( 'Contact parent:', 'text_domain' ),
'all_items' => __( 'Tous les contacts', 'text_domain' ),
'add_new_item' => __( 'Ajouter contact', 'text_domain' ),
'add_new' => __( 'Ajouter nouveau', 'text_domain' ),
'new_item' => __( 'Nouveau contact', 'text_domain' ),
'edit_item' => __( 'Editer contact', 'text_domain' ),
'update_item' => __( 'Update contact', 'text_domain' ),
'view_item' => __( 'Voir contact', 'text_domain' ),
'view_items' => __( 'Voir contacts', 'text_domain' ),
'search_items' => __( 'Rechercher contact', 'text_domain' ),
'not_found' => __( 'Pas trouvé', 'text_domain' ),
'not_found_in_trash' => __( 'Pas trouvé dans la poubelle', 'text_domain' ),
'featured_image' => __( 'Image à la une', 'text_domain' ),
'set_featured_image' => __( 'Définir image à la une', 'text_domain' ),
'remove_featured_image' => __( 'Supprimer image à la une', 'text_domain' ),
'use_featured_image' => __( 'Utiliser comme image à la une', 'text_domain' ),
'insert_into_item' => __( 'Insérer dans le contact', 'text_domain' ),
'uploaded_to_this_item' => __( 'Télécharger dans ce contact', 'text_domain' ),
'items_list' => __( 'Liste des contacts', 'text_domain' ),
'items_list_navigation' => __( 'Navigation dans la liste des contacts', 'text_domain' ),
'filter_items_list' => __( 'Filtrer la liste des contacts', 'text_domain' ),
);
$args = array(
'label' => __( 'Contact', 'text_domain' ),
'description' => __( 'Annuiare de contacts de la commune de Dompierre', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor' ),
'taxonomies' => array( 'type' ),
'hierarchical' => false,
'public' => true,
'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' => true,
'capability_type' => 'page',
);
register_post_type( 'contacts', $args );
}
add_action( 'init', 'contact_post_type', 0 );