WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven 1.2 change titel and slogan to a image (3 posts)

  1. Ogggeee
    Member
    Posted 2 years ago #

    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!

  2. Lisa Sabin-Wilson
    Member
    Posted 2 years ago #

    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.

  3. Ogggeee
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic