• Resolved secampbell

    (@secampbell)


    Over the last few days, I’ve created a Child theme for the Twenty Ten theme so that I could enlarge the tagline on the top right hand side and change the footer link and image. To do those things, I’ve used a child style.css and new footer file.

    However, when I activate the child, the default header image (for Twenty Ten) comes up…so I obviously have to take care of that too with my Child setup. I’m hoping that it can be taken care in the new css file I created. Otherwise, I believe the header.php file would need to be altered(?). Can someone please give me some guidance on this?

    Scott

Viewing 8 replies - 1 through 8 (of 8 total)
  • Try adding a modified header.php template file to your theme.

    Thread Starter secampbell

    (@secampbell)

    Thanks, esmi. I’ve looked at the header.php code and honestly cannot find the area where I would modify to point to another url (to find my modified image). Can you give me some direction there?

    <?php
    					// Check if this is a post or page, if it has a thumbnail, and if it's a big one
    					if ( is_singular() &&
    							has_post_thumbnail( $post->ID ) &&
    							( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    							$image[1] >= HEADER_IMAGE_WIDTH ) :
    						// Houston, we have a new header image!
    						echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    					else : ?>
    						<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    					<?php endif; ?>
    			</div><!-- #branding -->
    Thread Starter secampbell

    (@secampbell)

    Esmi,

    I’m not sure what you’re telling me. Yes, that is the area of the header.php file that I believe I would need to modify. What specifically in that code would I modify to change (or point to) the location of the revised image?

    Thanks again,

    Everything from if ( is_singular() down to <?php endif; ?>

    Thread Starter secampbell

    (@secampbell)

    Esmi,

    Thanks for the direction. Unfortunately you’ve discovered my weakness. I know html pretty well, but I don’t know javascript. If there’s something in the code that is obvious, then I’m good. But if there’s code writing to be done, I’m lost.

    I guess I’m going to need someone to generate this code for me. Do you do that? How much do you charge? Can you give me a little direction on that?

    Thanks,

    I don’t know javascript

    It’s actually PHP. 🙂

    Do you do that?

    Yes, I certainly do. If you follow the Theme Diva link to my profile, you’ll find my contact email address.

    Thread Starter secampbell

    (@secampbell)

    ok

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

The topic ‘Changing default header image using Child theme’ is closed to new replies.