Twenty Ten
[twentyten-child] php file in child (3 posts)

  1. buildy
    Posted 2 years ago #

    I'm using wordpress 3.1.3 with the twentyten theme see http://build.adventureriders.com.au/.

    I want to edit header.php to facilitate image rotation in the header. The code would be approx:

    <img src="path_to_images/top_image_<?php echo(rand(1,5)); ?>.jpg"
    width="image_width" height="image_height" alt="image_alt_text" />

    I'll tidy that up to use already created variables, etc.

    My question is:
    Do I need to have the entire header.php file? As I cannot see how else it would work. If I do not need to recreate the entire file please explain fully.

    Thanking you in anticipation,

  2. buildy
    Posted 2 years ago #

    Do I need to copy the entire header.php file to the child directory?
    Can I just have the one function I want to edit?

  3. WPyogi
    Forum Moderator
    Posted 2 years ago #

    Yes, for a .php file (except functions.php), copy the entire file to the child theme and make the changes in that copy.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic