__('Menu Principal', 'wp-theme-sen2'), // Menu principal en haut 'secondary' => __('Menu Latéral', 'wp-theme-sen2') // Menu secondaire à gauche )); // Supports du thème add_theme_support('post-thumbnails'); add_theme_support('title-tag'); add_theme_support('automatic-feed-links'); } add_action('after_setup_theme', 'wp_theme_sen2_setup'); // Chargement des scripts et styles function wp_theme_sen2_scripts() { wp_enqueue_style('wp-theme-sen2-style', get_stylesheet_uri()); wp_enqueue_style('wp-theme-sen2-google-fonts', 'https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap'); wp_enqueue_style('wp-theme-sen2-font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css'); } add_action('wp_enqueue_scripts', 'wp_theme_sen2_scripts'); // Custom Post Type pour Portfolio function wp_theme_sen2_custom_post_type() { register_post_type('portfolio', array( 'labels' => array( 'name' => __('Portfolio', 'wp-theme-sen2'), 'singular_name' => __('Projet', 'wp-theme-sen2') ), 'public' => true, 'has_archive' => true, 'supports' => array('title', 'editor', 'thumbnail'), )); } add_action('init', 'wp_theme_sen2_custom_post_type'); // Personnalisation du slogan via Customizer function wp_theme_sen2_customize_register($wp_customize) { $wp_customize->add_section('wp_theme_sen2_slogan_section', array( 'title' => __('Slogan du site', 'wp-theme-sen2'), 'priority' => 30, )); $wp_customize->add_setting('wp_theme_sen2_slogan', array( 'default' => 'Photographier l\'humain, révéler l\'essentiel.', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('wp_theme_sen2_slogan_control', array( 'label' => __('Slogan', 'wp-theme-sen2'), 'section' => 'wp_theme_sen2_slogan_section', 'type' => 'text', )); } add_action('customize_register', 'wp_theme_sen2_customize_register'); ?>