get_header_textcolor example

if ( $custom_header->width ) {
                    $header_image_style .= 'max-width:' . $custom_header->width . 'px;';
                }
                if ( $custom_header->height ) {
                    $header_image_style .= 'height:' . $custom_header->height . 'px;';
                }
                ?> <div id="headimg" style="<?php echo $header_image_style; ?>"> <?php                 if ( display_header_text() ) {
                    $style = ' style="color:#' . get_header_textcolor() . ';"';
                } else {
                    $style = ' style="display:none;"';
                }
                ?> <h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo( 'url' ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1> <div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div> </div> <?php } ?> </td> </tr> <?php endif; ?>

function get_header_textcolor() {
    return get_theme_mod( 'header_textcolor', get_theme_support( 'custom-header', 'default-text-color' ) );
}

/** * Displays the custom header text color in 3- or 6-digit hexadecimal form (minus the hash symbol). * * @since 2.1.0 */
function header_textcolor() {
    echo get_header_textcolor();
}

/** * Whether to display the header text. * * @since 3.4.0 * * @return bool */
function display_header_text() {
    if ( ! current_theme_supports( 'custom-header', 'header-text' ) ) {
        
Home | Imprint | This part of the site doesn't use cookies.