WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Child theme Header in Admin (3 posts)

  1. Tara
    Member
    Posted 3 years ago #

    Hi,

    When you are in DASHBOARD>>THEMES,
    You see all available themes with their respective header. For example, the defoult twentyten has "path" header.

    I have created twentyten child, and added my own header images following Jorbin's guide.

    But when I am in the Dashboard, it is listed among the available themes (DASHBOARD>>THEMES) but without the image.

    However when I view it in the browser it does display the selected header image.

    Question: I just wonder why it the this child theme in the DASHBOARD>>THEMES is not accopanied by its selected header image?

  2. Tara
    Member
    Posted 3 years ago #

    Anybody?
    Please look at my child theme's function.php and please correct all the mistakes I might have made (I am not a dev, programmer or pro).

    Thanks alot.

    `<?php
    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 130 ) );
    function mytwentyten_setup() {
    $mytwentyten_dir = get_bloginfo('stylesheet_directory');
    register_default_headers( array(

    // my header images
    'gt1' => array(
    'url' => "$mytwentyten_dir/images/headers/mygt1.jpg",
    'thumbnail_url' => "$mytwentyten_dir/images/headers/mygt1-thumbnail.jpg",
    /* translators: header image description */
    'description' => __( 'gt1', 'mytwentyten' )
    ),
    'gt2' => array(
    'url' => "$mytwentyten_dir/images/headers/mygt2.jpg",
    'thumbnail_url' => "$mytwentyten_dir/images/headers/mygt2-thumbnail.jpg",
    /* translators: header image description */
    'description' => __( 'gt2', 'mytwentyten' )
    )
    ) );
    }`

  3. Tara
    Member
    Posted 3 years ago #

    I am sure of the accuracy of my child theme's functions.php. Since I am not a pro, any help will greatly be appreciated. Before I replace my 2.92 with 3.0, I just want to make sure there is no error in functions.php

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic