Header image (wordpress)

Enabled custom header image.

<?php
/**
 * Enable custom header image.
 */
if (function_exists('add_theme_support')) {
    add_theme_support('custom-header');
}
?>

functions.php

<?php
    if (get_header_image()) {
        printf('<img src="%s" alt="%s">', get_header_image(), get_bloginfo('name'));
    } else {
        bloginfo('name');
    }
?>

header.php

< toolbox