|
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() ) : |
38 | | - ?> |
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; |
| 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() ) ) ); |
44 | 37 |
|
45 | | - $description = get_bloginfo( 'description', 'display' ); |
46 | | - if ( $description || is_customize_preview() ) : |
| 38 | + if ( ! empty( get_bloginfo( 'name' ) ) ) : |
| 39 | + if ( is_front_page() && is_home() ) : |
47 | 40 | ?> |
48 | | - <p class="site-description"><?php echo $description; ?></p> |
49 | | - <?php |
| 41 | + <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> |
| 42 | + <?php else : ?> |
| 43 | + <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> |
| 44 | + <?php |
50 | 45 | endif; |
| 46 | + endif; |
| 47 | + |
| 48 | + $description = get_bloginfo( 'description', 'display' ); |
| 49 | + if ( $description || is_customize_preview() ) : |
51 | 50 | ?> |
| 51 | + <p class="site-description"><?php echo $description; ?></p> |
| 52 | + <?php |
| 53 | + endif; |
| 54 | + ?> |
52 | 55 | <button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button> |
53 | 56 | </div><!-- .site-branding --> |
54 | 57 | </header><!-- .site-header --> |
|
0 commit comments