Skip to content
22 changes: 17 additions & 5 deletions src/wp-content/themes/twentyeleven/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,26 @@
<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' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
$site_description = get_bloginfo( 'description' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated

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 echo $site_name; ?></a></span></h1>
<?php
endif;

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

<?php
// Check to see if the header image has been removed.
$header_image = get_header_image();
// Check to see if the header image has been removed.
$header_image = get_header_image();
if ( $header_image ) :
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
Expand Down
29 changes: 15 additions & 14 deletions src/wp-content/themes/twentyfifteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +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 : ?>
<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;
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_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 echo $site_name; ?></a></p>
<?php
endif;

$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $description; ?></p>
<?php
endif;
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
Comment thread
Sukhendu2002 marked this conversation as resolved.
?>
<p class="site-description"><?php echo $description; ?></p>
<?php endif; ?>

<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
</div><!-- .site-branding -->
</header><!-- .site-header -->
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 echo $site_name; ?></a></h1>
<?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,18 @@
<?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() ) : ?>
<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 endif; ?>

<?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 echo $site_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 echo $site_name; ?></a></p>
<?php
endif;

$description = get_bloginfo( 'description', 'display' );

if ( $description || is_customize_preview() ) :
Expand Down
16 changes: 10 additions & 6 deletions src/wp-content/themes/twentysixteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@
<header id="masthead" class="site-header">
<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
twentysixteen_the_custom_logo();
$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 echo $site_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 echo $site_name; ?></a></p>
<?php
endif;

Expand Down
32 changes: 22 additions & 10 deletions src/wp-content/themes/twentyten/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,29 @@
<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
// Compatibility with versions of WordPress prior to 3.4.
$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 ) :
?>
<<?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 echo $site_name; ?></a>
</span>
</<?php echo $heading_tag; ?>>
<?php
endif;

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

// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
/*
* We need to figure out what the minimum width should be for our featured image.
Expand Down
15 changes: 12 additions & 3 deletions src/wp-content/themes/twentythirteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,19 @@
?>
</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' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
$site_description = get_bloginfo( 'description' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated

?>
<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 echo $site_name; ?></h1>
<?php endif; ?>
<?php if ( $site_description ) : ?>
<h2 class="site-description"><?php echo $site_description; ?></h2>
<?php endif; ?>
</a>

<div id="navbar" class="navbar">
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' );
Comment thread
Sukhendu2002 marked this conversation as resolved.
Outdated
$site_description = get_bloginfo( 'description' );
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 echo $site_name; ?></a></h1>
<?php
endif;

if ( $site_description ) :
?>
<h2 class="site-description"><?php echo $site_description; ?></h2>
<?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