services
if ( ! function_exists('services') ) {
// Register Custom Post Type
function services() {
$labels = array(
'name' => _x( 'services', 'Post Type General Name', 'Avada' ),
'singular_name' => _x( 'Service', 'Post Type Singular Name', 'Avada' ),
'menu_name' => __( 'Services', 'Avada' ),
'name_admin_bar' => __( 'Services', 'Avada' ),
'archives' => __( 'Services Archives', 'Avada' ),
'attributes' => __( 'Services Attributes', 'Avada' ),
'parent_item_colon' => __( 'Services Parent:', 'Avada' ),
'all_items' => __( 'Tous les Services', 'Avada' ),
'add_new_item' => __( 'Ajouter Service', 'Avada' ),
'add_new' => __( 'Ajouter un service', 'Avada' ),
'new_item' => __( 'Nouveau service', 'Avada' ),
'edit_item' => __( 'Editer service', 'Avada' ),
'update_item' => __( 'Mettre à jour le service', 'Avada' ),
'view_item' => __( 'Voir le service', 'Avada' ),
'view_items' => __( 'Voir les services', 'Avada' ),
'search_items' => __( 'Chercher un service', 'Avada' ),
'not_found' => __( 'Non trouvé', 'Avada' ),
'not_found_in_trash' => __( 'Introuvable dans la corbeille', 'Avada' ),
'featured_image' => __( 'Featured Image', 'Avada' ),
'set_featured_image' => __( 'Set featured image', 'Avada' ),
'remove_featured_image' => __( 'Remove featured image', 'Avada' ),
'use_featured_image' => __( 'Use as featured image', 'Avada' ),
'insert_into_item' => __( 'Insert into item', 'Avada' ),
'uploaded_to_this_item' => __( 'Téléchargé sur ce service', 'Avada' ),
'items_list' => __( 'List des services', 'Avada' ),
'items_list_navigation' => __( 'Naviguer dans les services', 'Avada' ),
'filter_items_list' => __( 'Filtrer la liste des services', 'Avada' ),
);
$args = array(
'label' => __( 'Service', 'Avada' ),
'description' => __( 'liste des services', 'Avada' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),
'taxonomies' => array( 'services_categorie' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-admin-appearance',
'show_in_admin_bar' => false,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
'show_in_rest' => true,
);
register_post_type( 'service', $args );
}
add_action( 'init', 'services', 0 );
}