WordPress.org

Support

Support » Themes and Templates » Twenty Eleven 1.2 change titel and slogan to a image

Twenty Eleven 1.2 change titel and slogan to a image

  • Hello!

    As the topic says I want to change my titel and slogan to a image instead. To remove the text I tried to delete the following lines in header.php but then my page could not be viewed at all.

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

    I suspect I need to change something in style.css #Header but I don’t know what to do. My image file is 266px × 104px. Help is much appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • It would be a CSS adjustment.

    To prevent the text from showing:

    h1#site-title span,
    h2#site-description {
    display:none
    }

    Then to display an image in that area, instead:

    h1#site-title {
    background: url(images/your-image.jpg) no-repeat;
    width: 266px;
    height: 104px;
    }

    You may need to also make small tweaks or adjustments to the existing CSS to make it look the way you want it to, but that basic idea should help you.

    However, I would recommend doing this as a child theme and make your adjustments that way, rather than directly editing the CSS of the parent theme you are using – – this will ensure that your modifications will remain when an upgrade to the parent theme is released.

    Hope that helps.

    Thank you very much Lisa! It worked like a charm!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Twenty Eleven 1.2 change titel and slogan to a image’ is closed to new replies.