Support » Themes and Templates » [Theme: Twenty Twelve] Replace site title with image?

  • Hi,

    I’m using the Twenty Twelve theme and I’d like to know how to replace the site title and tagline with an image.

    Thank you!

Viewing 4 replies - 16 through 19 (of 19 total)
  • Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    @newsgrip, what page does it link to?

    Hi – Thanks to alchymyth his instruction worked fine. Question is it possible to have the image click back to the home page.

    Go to Dashboard > Appearance > Editor
    Edit header.php
    Find the following line:
    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>

    Make the change:
    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="http://javaadmin.com/wp-content/uploads/2013/05/logo-1.png" style="float: right;" alt="Logo" /></a></h1>

    Note: Don’t forget to put the right URL for the logo.

    Im using the code below and it works fine. I have tried Amitabha Roy’s code but I cant get it to center accurately on the phone.

    <img class="site-logo" src="<?php echo get_stylesheet_directory_uri(); ?>/images/new-vanit-hair-logo.png" alt="site logo" />
    
    .site-header hgroup {
    display: none;
    } 
    
    .site-logo {
    	max-width: 100%; height:auto;
    	margin-left: auto;
    	margin-right: auto;
    	display:block;
    }
Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘[Theme: Twenty Twelve] Replace site title with image?’ is closed to new replies.