• Hello friends,
    I am trying to built a custom theme and I need your help to do so.

    By default WordPress publishes “Site Title” at the top of the site, most probably within H1 tag.
    I want to replace the “Site Title” with a logo.
    The easiest way is to edit the header.php file i.e. replacing the Site-Title with <img src”….

    What I want to do:
    If I publish my theme for free download then users may not be able to replace my logo with the logo of there company, there I want to add the option in “Appearance” section where users can upload there logo.

    —————————————
    OPTION TRIED:

    I used the following codes in header.php file;

    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />

    Function.php (ref. from Twentyten Theme)

    define( 'HEADER_TEXTCOLOR', '' );
    define( 'HEADER_IMAGE', '%s/images/logo.png' );
    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 250 ) );
    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 73 ) );
    set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
    define( 'NO_HEADER_TEXT', true );
    add_custom_image_header( '', 'twentyten_admin_header_style' );

    PROBLEM:
    This works perfectly fine without any error, BUT my theme also needs a Custom header therefore I can not use this option twice.

    Is there any way I can have option for LOGO IMAGE and option for HEADER IMAGE both in “Appearance” section at WP-Admin.

    Please guide me to do so, Thank you 🙂

The topic ‘Replacing Site Title with Logo’ is closed to new replies.