Skip to content
18 changes: 15 additions & 3 deletions src/wp-content/themes/twentyeleven/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,21 @@
<div id="page" class="hfeed">
<header id="branding">
<hgroup>
<?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?>
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></span></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
$site_name = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );

if ( $site_name || $site_description ) :
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
?>
<?php if ( $site_name ) : ?>
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></span></h1>
<?php endif; ?>

<?php if ( $site_description ) : ?>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php endif; ?>
<?php endif; ?>
</hgroup>

<?php
Expand Down
16 changes: 9 additions & 7 deletions src/wp-content/themes/twentyfifteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,24 @@
<header id="masthead" class="site-header">
<div class="site-branding">
<?php
twentyfifteen_the_custom_logo();
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
if ( is_front_page() && is_home() ) :
twentyfifteen_the_custom_logo();
Comment thread
Sukhendu2002 marked this conversation as resolved.
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
$site_name = get_bloginfo( 'name' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated

if ( $site_name && is_front_page() && is_home() ) :
?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
<?php elseif ( $site_name ) : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></p>
<?php
endif;
endif;

$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $description; ?></p>
<?php
endif;
endif;
?>
<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
</div><!-- .site-branding -->
Expand Down
7 changes: 6 additions & 1 deletion src/wp-content/themes/twentyfourteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@

<header id="masthead" class="site-header">
<div class="header-main">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
<?php
$site_name = get_bloginfo( 'name' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
if ( $site_name ) :
?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
<?php endif; ?>

<div class="search-toggle">
<a href="#search-container" class="screen-reader-text" aria-expanded="false" aria-controls="search-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
<?php the_custom_logo(); ?>

<div class="site-branding-text">
<?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?>
<?php if ( is_front_page() ) : ?>
<?php
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
$site_name = get_bloginfo( 'name' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated

if ( $site_name && is_front_page() ) :
?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
<?php else : ?>
<?php
elseif ( $site_name ) :
?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
<?php
endif;

<?php
$description = get_bloginfo( 'description', 'display' );

if ( $description || is_customize_preview() ) :
Expand Down
16 changes: 11 additions & 5 deletions src/wp-content/themes/twentysixteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@
<div class="site-header-main">
<div class="site-branding">
<?php twentysixteen_the_custom_logo(); ?>
<?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?>
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></p>
<?php
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
$site_name = get_bloginfo( 'name' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated

if ( $site_name && is_front_page() && is_home() ) :
?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
<?php
elseif ( $site_name ) :
?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></p>
<?php
endif;

Expand Down
28 changes: 20 additions & 8 deletions src/wp-content/themes/twentyten/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,26 @@
<div id="header">
<div id="masthead">
<div id="branding" role="banner">
<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
<<?php echo $heading_tag; ?> id="site-title">
<span>
<?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a>
</span>
</<?php echo $heading_tag; ?>>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
<?php
$heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div';
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
$site_name = get_bloginfo( 'name' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
$site_description = get_bloginfo( 'description' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated

Comment thread
Sukhendu2002 marked this conversation as resolved.
if ( $site_name || $site_description ) :
?>
<?php if ( $site_name ) : ?>
<<?php echo $heading_tag; ?> id="site-title">
<span>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a>
</span>
</<?php echo $heading_tag; ?>>
<?php endif; ?>

<?php if ( $site_description ) : ?>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
<?php endif; ?>
<?php endif; ?>

<?php
// Compatibility with versions of WordPress prior to 3.4.
Expand Down
17 changes: 14 additions & 3 deletions src/wp-content/themes/twentythirteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,22 @@
?>
</a>
<header id="masthead" class="site-header">
<?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?>
<?php
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
$site_name = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );

if ( $site_name || $site_description ) :
?>
<a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>>
<h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php if ( $site_name ) : ?>
<h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
<?php endif; ?>
<?php if ( $site_description ) : ?>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php endif; ?>
</a>
<?php endif; ?>

<div id="navbar" class="navbar">
<nav id="site-navigation" class="navigation main-navigation">
Expand Down
18 changes: 15 additions & 3 deletions src/wp-content/themes/twentytwelve/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,21 @@
<a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
<header id="masthead" class="site-header">
<hgroup>
<?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
$site_name = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );

if ( $site_name || $site_description ) :
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
?>
<?php if ( $site_name ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1>
<?php endif; ?>

<?php if ( $site_description ) : ?>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php endif; ?>
<?php endif; ?>
</hgroup>

<nav id="site-navigation" class="main-navigation">
Expand Down
4 changes: 4 additions & 0 deletions src/wp-content/themes/twentytwenty/inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ function twentytwenty_site_logo( $args = array(), $display = true ) {
$contents = sprintf( $args['logo'], $logo, esc_html( $site_title ) );
$classname = $args['logo_class'];
} else {
if ( ! $site_title ) {
return '';
}

$contents = sprintf( $args['title'], esc_url( get_home_url( null, '/' ) ), esc_html( $site_title ) );
if (
( is_front_page() || is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) )
Expand Down
Loading