diff --git a/inc/helpers/template-tags.php b/inc/helpers/template-tags.php index adff456..0355fb4 100644 --- a/inc/helpers/template-tags.php +++ b/inc/helpers/template-tags.php @@ -114,25 +114,39 @@ function blank_theme_entry_footer() { } /** - * Get site title. + * Get site title with additional context. * * @param string $title_class Show or hide title. * * @return void */ function blank_theme_site_title( $title_class = '' ) { - $title_format = '

%s

'; - - if ( is_front_page() && is_home() ) { - $title_format = '

%s

'; + $title_format = '

%s

'; // Change to use

for site title + + $site_name = get_bloginfo( 'name', 'display' ); + $site_description = get_bloginfo( 'description', 'display' ); + + // Check if a site description is available. + if ( $site_description ) { + $site_title = sprintf( + $title_format, + esc_attr( $title_class ), + '' . + '' . esc_html( $site_name ) . '' . + '' . esc_html( $site_description ) . '' . + '' + ); + } else { + $site_title = sprintf( + $title_format, + esc_attr( $title_class ), + '' . + '' . esc_html( $site_name ) . '' . + '' + ); } - printf( - $title_format, // phpcs:ignore - esc_attr( $title_class ), - esc_url( home_url( '/' ) ), - get_bloginfo( 'name', 'display' ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - ); + echo $site_title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /**