• drdebmv

    (@drdebmv)


    Rather than have a text link at the top of the left nav bar (site title) I would like to have a logo link. Any straight forward way to do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • CreativeNaturalista

    (@creativenaturalista)

    Hi drdebmv,

    I checked around and it seems that you may have luck updating the Twenty Fifteen theme by including (img src=”image.png”) to it. This will also remove the Text Title all together. It’s best if you’re doing these changes in a Child theme so you don’t lose them during theme upgrades.

    Try adding a logo image via the following:

    Open the header.php file and look for:

    <div class="site-branding">
    				<?php
    					if ( is_front_page() && is_home() ) : ?>
    						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    					<?php else : ?>
    						<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
    					<?php endif;
    
    					$description = get_bloginfo( 'description', 'display' );
    					if ( $description || is_customize_preview() ) : ?>
    						<p class="site-description"><?php echo $description; ?></p>
    					<?php endif;
    				?>
    				<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
    			</div><!-- .site-branding -->

    and comment that out or change that to:

    <div class="site-branding">
    				<?php
    					if ( is_front_page() && is_home() ) : ?>
    						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?><img src="image.png" height="151" width="248"></a></h1>
    					<?php else : ?>
    						<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?><img src="image.png" height="151" width="248"></a></p>
    					<?php endif;
    
    					$description = get_bloginfo( 'description', 'display' );
    					if ( $description || is_customize_preview() ) : ?>
    						<p class="site-description"><?php echo $description; ?></p>
    					<?php endif;
    				?>
    				<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
    			</div><!-- .site-branding -->
    		</header><!-- .site-header -->

    That should help you include the image logo and you can adjust the height and width as you see fit.

    I hope this helps,
    Charlene

    paulwpxp

    (@paulwp)

    Thread Starter drdebmv

    (@drdebmv)

    This worked!! Thanks so much Paulwpxp!! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Twenty Fifteen add logo to header?’ is closed to new replies.