I am having an issue trying to configure the theme I am working on to allow the footer color to be changed. So far all of my other options work so I am geussing it is an issue with the way I am calling back to the css class.
This is the footer class:
.footer {
background: #f7f7f7;
height: 150px;
position: relative;
z-index: 7;
-webkit-box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 0 2px 20px rgba(0,0,0,0.4);
-ms-box-shadow: 0 2px 20px rgba(0,0,0,0.4);
-o-box-shadow: 0 2px 20px rgba(0,0,0,0.4);
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}
This is how I am calling it from the theme:
function theme_header_css() {
?>
<style>
.footer {
background: <?php echo my_theme_mod( 'hero_footer_color' ); ?>;
}
</style
<?php
}
add_action( 'wp_head', 'theme_header_css' );
I tried calling background-color instead of background but that doesn't seem to work. I am thinking that I am not calling the class right. Can anyone give me a hand?
EDIT: When I check the page CSS I can see that it is attempting to override the background color, although it is not producing a value and appears like this:
.footer { background: ; }
After checking through multiple times it is the proper setting, so I am at a loss to what it is, if it is not the CSS.
Here is get_theme_mods()
function my_get_theme_mods() {
$defaults = array(
'my_hero_title' => '',
'my_hero_description' => '',
'my_hero_background_color' => '#17649a',
'my_hero_background_image' => '',
'my_hero_background_repeat' => 'no-repeat',
'my_hero_background_position' => 'center',
'my_footer_color' => '#f7f7f7',
);
return $defaults;