How to: add logo in wp twenty fifteen theme

First of all, ensure you are working in a child theme, otherwise your changes will be overwritten during the next theme update.

1. In your ftp client, open header.php, located in wp-content > themes > twentyfifteen.

2. Copy header.php into your child theme folder, so wp-content > themes > twentyfifteen_child.

3. In the copied header.php, we need to find the code which calls the Site Title and replace it with the logo itself.

a) find code calling and echoing Site Title

b) replace the code with the logo itself

<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><img src="" alt=" logo"></a>


Please note:

  • Replace with the actual path to your logo.
  • When replacing the relevant lines of code, the last line of replaced code needs to be the <?php tag, as the following line of code is php!

4. Save the header.php in our child theme. When we check the website now, we’ll see our logo instead of the Site Title.