site-branding.php 1.2 KB

1234567891011121314151617181920212223242526
  1. <div class="header-wrapper clear">
  2. <div class="site-branding">
  3. <?php if ( is_front_page() && is_home() ) : ?>
  4. <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
  5. <?php else : ?>
  6. <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
  7. <?php endif; ?>
  8. </div><!-- .site-branding -->
  9. <?php get_template_part( 'components/navigation/navigation', 'top' ); ?>
  10. </div><!-- .header-wrapper -->
  11. <?php if ( '' != get_header_image() && ( is_home() || is_front_page() || is_archive() || is_search() ) ) { ?>
  12. <div class="site-description-wrapper">
  13. <?php affinity_the_site_logo(); ?>
  14. <?php $description = get_bloginfo( 'description', 'display' );
  15. if ( $description || is_customize_preview() ) : ?>
  16. <p class="site-description"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo $description; /* WPCS: xss ok. */ ?></a></p>
  17. <?php endif; ?>
  18. </div><!-- .site-description-wrapper -->
  19. <?php } ?>
  20. <?php if ( is_singular() && ! is_front_page() && ( '' != get_header_image() || has_post_thumbnail() ) ) {
  21. the_title( '<h1 class="entry-title">', '</h1>' );
  22. } ?>