Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Michael Owusu
Courses Plus Student 48 Pointsget_theme_mod default values not showing.
In wordpress customizer, I have created settings and added default values to them. They do not show up but when i visit the customizer page I see the default values being applied. Also they do not show up on the front page unless i add custom values to them first.
1 Answer

Jacobus Hindson
14,429 PointsI am not expert of the Customizer, just learning myself but are you calling your Settings via css like:
.footer {
border-top: solid 1px #<?php echo get_theme_mod( 'background_color' ); ?>;
}
Michael Owusu
Courses Plus Student 48 PointsMichael Owusu
Courses Plus Student 48 PointsNo Jacobus. (and also sorry for no asking the question well) I was asking about declaring default values when creating a "setting and control".
I realized that the default values when creating the settings and controls will not show up unless the user first add a custom value. for example this default value which is "#cfcfcf" will not show up
But I have been able to work around it. I just have to re-declare the default value again in get_theme_mod like this
this one works perfect.
Jacobus Hindson
14,429 PointsJacobus Hindson
14,429 PointsWell glad it has all worked out for you.