• I have a TwentyTen Child theme.

    I have made the margin at the top of the page bigger using css.

    Is there a way I can add images here using CSS and functions.php without altering the parent theme?

    I would like to put a DIV there with a few image links, text links, etc.

Viewing 6 replies - 1 through 6 (of 6 total)
  • If you don’t want to change the parent theme, you would need to create and use a child theme that contained your amendments.

    Thread Starter BRIXBOSTON

    (@brixboston)

    Hi Esmi. Cool avatar!

    I have already created and use a Child Theme.

    I am wondering if this is possible without creating a header.php in my child theme and amending the DIV manually.

    Can it be done in TwentyTen using a Plugin API Hook and functions.php?

    <?php
    
    function icons_div() {
        echo '<div id=icons></div>' . "\n";
    }
    add_action('wp_head', 'icons_div');
    
    ?>

    ^^^ But I cannot put a <DIV> in wp_head.

    You don’t want to touch wp_head(). It doesn’t output your header but is used by the core and as a hook for plugins etc.

    The easiest way to achieve what you’re after is to copy the 2010 header.php file into your child theme and then start amending anything from <div id="header"> down to </div><!-- #header --> as appropriate.

    Thread Starter BRIXBOSTON

    (@brixboston)

    I didn’t want to mess with wp_head()
    I was wondering if there was another theme hook in TwentyTen other than wp_head

    Thanks for the help btw.

    Not that you can use to add additional images and/or a <div></div> to the header markup.

    BRIX, check out thematic, I think it provides more action hooks and will be easier to manipulate for you.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Adding DIV to TwentyTen Child Theme w/CSS & functions.php’ is closed to new replies.