diff --git a/wp-content/themes/ccat/app/pages/[...uri].vue b/wp-content/themes/ccat/app/pages/[...uri].vue index c4c21f6..fdd2bc6 100644 --- a/wp-content/themes/ccat/app/pages/[...uri].vue +++ b/wp-content/themes/ccat/app/pages/[...uri].vue @@ -5,10 +5,9 @@ useSeoMeta({ title: node?.title }); diff --git a/wp-content/themes/ccat/includes/graphql/breadcrumbs.php b/wp-content/themes/ccat/includes/graphql/breadcrumbs.php index c6d517d..8705fee 100644 --- a/wp-content/themes/ccat/includes/graphql/breadcrumbs.php +++ b/wp-content/themes/ccat/includes/graphql/breadcrumbs.php @@ -50,7 +50,7 @@ function ccat_get_breadcrumbs( $node ) { if ( $post ) { $breadcrumbs = ccat_get_post_breadcrumbs( $post ); $breadcrumbs[] = array( - 'label' => get_the_title( $post->ID ), + 'label' => html_entity_decode( get_the_title( $post->ID ), ENT_QUOTES, 'UTF-8' ), 'uri' => null, ); } @@ -59,7 +59,7 @@ function ccat_get_breadcrumbs( $node ) { if ( $term && ! is_wp_error( $term ) ) { $breadcrumbs = ccat_get_term_breadcrumbs( $term ); $breadcrumbs[] = array( - 'label' => $term->name, + 'label' => html_entity_decode( $term->name, ENT_QUOTES, 'UTF-8' ), 'uri' => null, ); } @@ -69,8 +69,17 @@ function ccat_get_breadcrumbs( $node ) { // Helper: Get breadcrumbs for a given post function ccat_get_post_breadcrumbs( $post ) { - $breadcrumbs = array(); - $post_type = get_post_type( $post->ID ); + $breadcrumbs = array(); + $is_front_page = get_option( 'show_on_front' ) === 'page' && get_option( 'page_on_front' ) == $post->ID; + if ( $is_front_page ) { + return $breadcrumbs; // No breadcrumbs for the front page + } else { + $breadcrumbs[] = array( + 'label' => 'Accueil', + 'uri' => '/', + ); + } + $post_type = get_post_type( $post->ID ); switch ( $post_type ) { case 'page': $ancestors = get_post_ancestors( $post->ID );