• There was a post a month ago about this but no proper reply – anyone got ideas about this?
    I simply want to have an image/logo instead of the text in the site title – it needs to be clickable of course…

Viewing 5 replies - 1 through 5 (of 5 total)
  • You have to edit the header.php file to do this. For these changes to persist even after updating the theme create a Child Theme first. Activate it and copy wp-content/themes/tonic/header.php to wp-content/themes/tonic-child/header.php

    Edit this copied header.php file go to line 45 and hard code your image

    <a href="<?php echo esc_url( home_url() ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="mylogo.png" alt="<?php bloginfo( 'name' ); ?>" /></a>

    It comes from header.php line 45

    <h1 id="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>

    You need to create a child theme for this

    if parent theme supports

    .
    and change the code to

    <h1 id="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php  echo get_stylesheet_directory_uri().'YOUR IMAGE PATH' ; ?>" alt="<?php bloginfo( 'name' );?> "></a></h1>

    here get_stylesheet_directory_uri() gets the current theme directory.

    Thread Starter ajpiano

    (@ajpiano)

    Thanks! You guys are awesome! 🙂

    I’ve tried bravokeyl and Jesin A ‘s soulutions and neither of them is accomplishing what I’m trying to do, which is just turn to whole banner image into a clickable link back to the home page. What am I missing?

    Line 45 of my header.php looks like this
    <a href="<?php echo esc_url( home_url() ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="path" alt="<?php bloginfo( 'name' ); ?>" /></a>

    @geekosupremo: If you require assistance then, as per the Forum Welcome, please post your own topic.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Replace site title with logo’ is closed to new replies.