|
32 | 32 | <header id="masthead" class="site-header"> |
33 | 33 | <div class="site-branding"> |
34 | 34 | <?php |
35 | | - twentyfifteen_the_custom_logo(); |
36 | | - $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); |
37 | | - if ( is_front_page() && is_home() ) : |
| 35 | + twentyfifteen_the_custom_logo(); |
| 36 | + $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); |
| 37 | + $site_name = get_bloginfo( 'name', 'display' ); |
| 38 | + |
| 39 | + if ( $site_name && is_front_page() && is_home() ) : |
38 | 40 | ?> |
39 | | - <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> |
40 | | - <?php else : ?> |
41 | | - <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> |
42 | | - <?php |
43 | | - endif; |
| 41 | + <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> |
| 42 | + <?php elseif ( $site_name ) : ?> |
| 43 | + <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> |
| 44 | + <?php |
| 45 | + endif; |
44 | 46 |
|
45 | | - $description = get_bloginfo( 'description', 'display' ); |
46 | | - if ( $description || is_customize_preview() ) : |
47 | | - ?> |
48 | | - <p class="site-description"><?php echo $description; ?></p> |
49 | | - <?php |
50 | | - endif; |
| 47 | + $description = get_bloginfo( 'description', 'display' ); |
| 48 | + if ( $description || is_customize_preview() ) : |
51 | 49 | ?> |
| 50 | + <p class="site-description"><?php echo $description; ?></p> |
| 51 | + <?php endif; ?> |
| 52 | + |
52 | 53 | <button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button> |
53 | 54 | </div><!-- .site-branding --> |
54 | 55 | </header><!-- .site-header --> |
|
0 commit comments