WordPress Mantra Child Theme – Custom Header with Logo

Header.php file was updated on the stonefly child theme of Mantra to include a site logo to the right of the site title and description. Source code from the header file is illustrated below:


<div id="branding" role="banner" >
<!-- Integrated site titel and description block added by SFS on 27-Mar-2012 -->
<div id="site-title-desc">
  <?php if ($mantra_options['mantra_linkheader']=="Enable") { ?>
    <a href="<?php echo home_url( '/' ); ?>" id="linky"> </a><?php } ?>
    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
  <<?php echo $heading_tag; ?> id="site-title">
  <span>
    <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?>
      </a>
    </span>
  </<?php echo $heading_tag; ?>>
  <!-- Site description -->
  <div id="site-description" >
    <?php bloginfo( 'description' ); ?>
  </div><!-- End site-description -->
</div><!-- End site-title-desc -->

<!-- Custom logo image added to right side of banner by SFS on 27-Mar-2012 -->
<div id="site-logo">
  <a href="<?php echo get_site_url(); ?>" title="<?php echo get_bloginfo( 'name', 'display' ); ?>" >
    <img src='http://stoneflysystems.com/wp-content/uploads/2012/03/stoneflylogoforweb.png' />
  </a>
</div>

</div><!-- End of banner -->
Bookmark the permalink.

Comments are closed.