true, 'width' => 300, 'flex-height' => true, 'height' => 60, 'default-text-color' => 'ffffff', 'wp-head-callback' => 'hueman_header_style', 'admin-head-callback' => 'hueman_admin_header_style', 'admin-preview-callback' => 'hueman_admin_header_image', ); add_theme_support( 'custom-header', $args ); } add_action( 'after_setup_theme', 'hueman_custom_header_setup' ); /** * Styles the header image displayed on the Appearance > Header admin panel. */ function hueman_admin_header_style(){ ?> Header admin panel. */ function hueman_admin_header_image(){ echo '
'; hueman_site_title(); echo '
'; } /** * Display the site header, using site title and site description * Replace title with the custom header image, if one exists. */ function hueman_site_title() { $class = get_header_image()? 'with-image': 'text-only'; $link = '' . get_bloginfo( 'name', 'display' ) . ''; if ( is_front_page() || is_home() ) { $sitename = '

' . $link . '

'."\n"; } else { $sitename = '

' . $link . '

'."\n"; } echo '
' . $sitename; if ( get_bloginfo( 'description' ) ) { echo '

' . get_bloginfo( 'description' ) . '

'; } echo '
'; }