WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. buildy
    Member
    Posted 10 months ago #

    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

  2. buildy
    Member
    Posted 10 months ago #

    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?

  3. WPyogi
    Volunteer Moderator
    Posted 10 months ago #

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

Reply

You must log in to post.

About this Theme

About this Topic