I have theme customize function in my customizer.php file:

function mytheme_customize_register( $wp_customize ) {
    $wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
    $wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
    $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

But I can't change header_textcolor using theme customizer. How can I use header text color value in my theme?

My header css:

.navbar-default .navbar-nav>.active>a {
    color: #777;
    background-color: transparent;

1 Answer 1


You have to inline the css into your theme. CSS is read-only and can't updated to use the update hex colors for your header.

<?php echo get_theme_mod( 'header_textcolor' );?> 100%);">

So find the div in your theme called navbar-default and update it to this:

<div style="background:#<?php echo get_theme_mod( 'header_textcolor' );?>"> class="navbar-default">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.