From a25b677e43fd900cb91f17f7bec24667c25ecbf2 Mon Sep 17 00:00:00 2001 From: nikeo Date: Mon, 18 Jan 2021 14:38:16 +0100 Subject: [PATCH] improved : [SEO] allow site title to be wrapped in a H1 tag when home is a static page --- functions/init-front.php | 4 +++- parts/page-title.php | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/functions/init-front.php b/functions/init-front.php index fd2a5db0..00d14167 100644 --- a/functions/init-front.php +++ b/functions/init-front.php @@ -453,7 +453,9 @@ function hu_get_logo_title( $is_mobile_menu = false ) { function hu_print_logo_or_title( $echo = true, $is_mobile_menu = false ) { // June 2020 => never write the mobile site-title in a h1 heading to avoid multiple h1 detected by SEO analyzers // @see https://github.com/presscustomizr/hueman/issues/906 - $wrap_in_h_one = is_home() && !$is_mobile_menu && hu_booleanize_checkbox_val( hu_get_option('wrap_in_h_one') ); + // option "wrap_in_h_one" should applyg when home is a static page or the blog page + // When home is a static page, the blog page heading should be set to H1 ( see parts\page-title.php ) + $wrap_in_h_one = hu_is_real_home() && !$is_mobile_menu && hu_booleanize_checkbox_val( hu_get_option('wrap_in_h_one') ); $logo_or_title = hu_get_logo_title( $is_mobile_menu ); // => If no logo is set and !hu_is_checked( 'display-header-title' ), the logo title is empty. ob_start(); diff --git a/parts/page-title.php b/parts/page-title.php index 25f9aa9b..0f753ff2 100644 --- a/parts/page-title.php +++ b/parts/page-title.php @@ -7,7 +7,11 @@
-

+ +

+ +

+