WordPress.org

Support

Support » Themes and Templates » [twentyten-child] php file in child

[twentyten-child] php file in child

  • G’day,
    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:

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

    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,
    build

Viewing 2 replies - 1 through 2 (of 2 total)
  • Do I need to copy the entire header.php file to the child directory?
    or
    Can I just have the one function I want to edit?

    WPyogi

    @wpyogi

    Forum Moderator

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[twentyten-child] php file in child’ is closed to new replies.