Add Logo to Twenty Fifteen Theme
By default WordPress twenty fifteen theme header logo comes with big header size (954 x 1300 image size) and occupies total area of header (sidebar), which not looks good.Before uploading a logo to twenty fifteen theme, made some changes in header.php file.By default, text (site name) will appear in the header,which looks normal.If you want to add a custom logo to twenty fifteen child theme,then follow this tutorial.
Method 1: Add logo to WordPress twenty fifteen theme
The following code helps you to add a custom logo with custom size to WordPress twenty fifteen child theme.This code should be added in your twenty fifteen child themes header.php file.
1.Go to dashboard and select editor under appearances.
2.In your twenty fifteen child theme, open header.php file.
3.Search for the following code
<div class="site-branding"><!--?php <br ?--> if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"></h1>
<p class="site-title"></p>
<!--?php endif;</p-->
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) : ?>
<p class="site-description"></p>
<!--?php endif;<br ?--> ?>
<button class="secondary-toggle"><!--?php _e( 'Menu and widgets', 'twentyfifteen' ); ?--></button>
</div>
<!-- .site-branding -->
4. Add the following code after the above code.
<a href="<?php"> rel="home>
<img src="http://yoursite.com/wp-content/uploads/2015/02/logo.png" alt=""website" /></a>
5.Change your header logo image URL with your logo link.
Method 2 :Another Way to add a logo to Twenty fifteen theme
1.Open your css file and add the following code at the end of in your style sheet.
.site-header {
background-image: url('images/logo.png');
background-repeat:no-repeat;
}
2.Now upload your custom logo in your child theme's images folder with the same image name mentioned in the code.
3.It's a very easy method to add a logo to WordPress twenty fifteen theme.