| | |

WordPress Child Theme – Add Logo to Twenty Ten Header

WordPress version: 3.1.3
Parent theme: TwentyTen 1.2

1. Replace WordPress 3.0 Twenty Ten theme title text by adding a logo image.
Full instructions: http://www.blog.web6.org/add-logo-to-twenty-ten-wordpress/

File: header.php (in child theme folder)

Replace:

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

With:

<h1 id="site-title">
<span>
<a href="<?php bloginfo ('home');?>" rel="home" title="<?php bloginfo('name');?>">
<img src="<?php echo bloginfo ('template_directory');?>/images/logo.png" alt="<?php bloginfo ('name');?>" />
</a>
</span>
</h1><!--end of h1 site-title-->

2. Next, we want to rename the directory URL from template_directory to stylesheet_directory, so the new logo is found in the Child Theme “images” folder.
Reference: http://codex.wordpress.org/Function_Reference/bloginfo

File: header.php (in child theme folder)

<h1 id="site-title">
<span>
<a href="<?php bloginfo ('home');?>" rel="home" title="<?php bloginfo('name');?>">
<img src="<?php echo bloginfo ('stylesheet_directory');?>/images/2020-eye-web-logo.gif" alt="<?php bloginfo ('name');?>" />
</a>
</span>
</h1><!--end of h1 site-title-->

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *