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 15 replies - 1 through 15 (of 19 total)
  • you know, you can use a header image in Twenty Twelve and hide the title and tagline (dashboard – appearance – header)- do you want to have another image instead of title and tagline?

    before you start any customisations, create a child theme to work with;

    hi, alchymyth,

    thanks for your response!

    i have already created a child theme.

    i would like to put a logo where the site title and tagline are now, then put a header image below that. the logo would be the name of a person and her occupation, and the header image below would be a photo of a forest.

    i could incorporate the logo into the header image, but the header image changes page-by-page, and i don’t want to have to load in the logo every time the user changes pages. (does that make sense?)


    for instance, edit header.php;

    insert this before <hgroup>:

    <img class="site-logo" src="<?php echo get_stylesheet_directory_uri(); ?>/images/site-logo.png" alt="site logo" />

    this assumes that the site-logo.png is saved in an /images folder of the child theme.

    add this to style.css to hide the site title and tag line and restrict the size of the logo for small screens:

    .site-header hgroup { display: none; }
    .site-logo { max-width: 100%; height:auto; }

    thank you, alchymyth.

    i’m having problems specifying the file path for my site logo (i don’t know PHP). the absolute file path is

    how do i specify this in your code?

    never mind — i figured it out. thank you!

    is it possible to put in a logo instead of the tagline without child theme? And with a url to the pic and not a path lige you mention?

    is it possible to put in a logo instead of the tagline without child theme?

    yes – but not recommended.

    And with a url to the pic and not a path like you mention?

    also possible – you can use a full absolute url to the image

    But how ? I have absoulutely no ide. I just want a logo above my menu :b

    Hello Alchymyth!!

    When I put the code u provided the logo appears above the site title. I want the site title to appear to the right side of the logo. Any way to do it?? My doimain –


    Please ignore the post above. I found the magazine theme would be better coz my site is a news portal.

    The above code works great and thanks, but what url do i put in so that when you click on the site logo you return to the site’s homepage?

    Moderator Andrew Nevins


    WCLDN 2018 Contributor | Volunteer support

    Dgissen, if you require support for your own issue, create your own thread.

    It’s actually related; there is code that you put in that very line. But thanks. I may do both.

    alchymyth, I was able to use your technique to replace the site title with my logo, and it worked fine, thanks for that advice. I used the specific company name in the image name and alt tag (instead of just the generic “site-title.png”); Do you know if my SEO will be affected adversely by hiding the actual site-title, or will it still be read by search engines? Thanks

    Hello Alchymyth. Your solution is working fine except my logo does not link to home page, what code should I add, to you code?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Theme: Twenty Twelve] Replace site title with image?’ is closed to new replies.