Forums

header + logo + widget (6 posts)

  1. BHasbrouckpri
    Member
    Posted 7 months ago #

    my site: http://www.ipoliticalrisk.com

    so i want to add a small logo to the left of my blog title and description and then enable an area to the right for a widget/banner ad. any ideas? i've been trying to do this since 8am EST and it's killing me.

    any help is appreciated!

  2. peredur
    Member
    Posted 7 months ago #

    Usual stuff about altering default themes in a Child Theme ...

    You'll need to make some alterations to header.php. Assuming you have a child theme, just copy header.php into it and then edit it to place the logo where you want it. Probably inside the <hgroup> element.

    You'll probably want to float the logo left and make some changes to the margins of the logo image, site title and site description. If you make the logo into a link, you'll have to specify border:none for the logo.

    HTH

    PAE

  3. BHasbrouckpri
    Member
    Posted 7 months ago #

    Hi again PAE,

    I was hoping someone might know of some enumerated instructions? I'm still a beginner on this. I have a child theme header.php file setup though. That much I know!

    Best,

    Brian

  4. peredur
    Member
    Posted 7 months ago #

    Well, it's a bit hard to give enumerated instructions since every theme is different.

    Are you using the twentyeleven theme?

    Cheers

    PAE

  5. BHasbrouckpri
    Member
    Posted 7 months ago #

    yeah, and i've set up a child theme. just trying to alter a few things.

  6. peredur
    Member
    Posted 7 months ago #

    I'd start off by copying header.php from twentyeleven into the child theme. Then look for this:

    <hgroup>
      <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>
    </hgroup>

    Adding an <img> element for your logo immediately inside the <hgroup> element would be a good start. I'd give the <img> element an id of logo if that id isn't already being used.

    After that, you'll probably want to add a style rule to your child theme's style.css file, like this:

    hgroup img#logo {
      float: left;
    }

    Once you've done that, you can look at it again to see if there's anything else you want to do to style things a bit more.

    HTH

    PAE

Reply

You must log in to post.

About this Topic

Tags