add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } /* nombre de sections dans la page d'accueil */ add_filter( 'twentyseventeen_front_page_sections', function(){ return 2; } ); /* Supprime le préfixe des archives WP */ /* Retirer les préfixes sur les pages d'archives */ function wpc_remove_archive_title_prefix() { if (is_category()) { $title = single_cat_title('', false); } elseif (is_tag()) { $title = single_tag_title('', false); } elseif (is_author()) { $title = '' . get_the_author() . '' ; } elseif (is_post_type_archive()) { $title = post_type_archive_title('', false); } return $title; } add_filter('get_the_archive_title', 'wpc_remove_archive_title_prefix'); /* Modification twentyseventeen_posted_on() */ if ( ! function_exists( 'twentyseventeen_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function twentyseventeen_posted_on() { // Get the author name; wrap it in a link. //YAN $byline = sprintf( /* translators: %s: post author */ //YAN __( 'by %s', 'twentyseventeen' ), //YAN '' //YAN ); // Finally, let's write all of this to the page. //YAN echo '' . twentyseventeen_time_link() . ''; echo '' . twentyseventeen_time_link() . ''; } endif; /* Suppression de la sidebar dans la boutique */ remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10); /* Joli menu panier */ // Add the cart link to menu function wpex_add_menu_cart_item_to_menus( $items, $args ) { // Make sure your change 'wpex_main' to your Menu location !!!! if ( $args->theme_location === 'top' ) { $css_class = 'menu-item menu-item-type-cart menu-item-type-woocommerce-cart'; if ( is_cart() ) { $css_class .= ' current-menu-item'; } $items .= '