Browse Source

Handle custom logo.

pull/41/head
Ned Zimmerman 7 years ago
parent
commit
0bd5d538fd
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 27
      header.php
  2. 4
      partials/content-front-page.php

27
header.php

@ -50,16 +50,25 @@
</div>
</div>
<div class="header__brand">
<a class="header__logo" href="<?php echo network_home_url(); ?>">
<svg class="logo--svg">
<use xlink:href="#logo-pressbooks" />
</svg>
<?php /* <span class="clip">
<?php switch_to_blog( 1 ); echo get_bloginfo( 'name', 'display' ); restore_current_blog(); ?>
</span> */ ?>
</a>
<h1><a href="<?php echo home_url( '/' ); ?>"><?php echo get_bloginfo( 'name', 'display' ); ?></a></h1>
<h1>
<a class="header__logo" href="<?php echo network_home_url(); ?>">
<?php if ( has_custom_logo() ) { ?>
<?php $custom_logo_id = get_theme_mod( 'custom_logo' );
printf(
'<img src="%1$s" srcset="%2$s" alt="%3$s" />',
wp_get_attachment_image_src( $custom_logo_id, 'logo' )[0],
wp_get_attachment_image_srcset( $custom_logo_id, 'large' ),
sprintf( __( 'Logo for %s', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) )
); ?>
<?php } else { ?>
<svg class="logo--svg">
<use xlink:href="#logo-pressbooks" />
</svg><?php }
echo get_bloginfo( 'name', 'display' ); ?>
</a>
</h1>
<p><?php echo get_bloginfo( 'description', 'display' ); ?></p>
</div>
<div class="header__end-container">
<nav class="header__nav js-header-nav" id="navigation">

4
partials/content-front-page.php

@ -24,7 +24,7 @@ $next_page = $page + 1;
?>
<section class="blocks blocks-<?php echo $block_count; ?> w-100">
<div class="blocks blocks-<?php echo $block_count; ?> w-100">
<?php if ( is_active_sidebar( 'front-page-block' ) ) :
dynamic_sidebar( 'front-page-block' );
else : ?>
@ -57,4 +57,4 @@ else : ?>
</div>
</div>
<?php endif; ?>
</section>
</div>

Loading…
Cancel
Save