Codex tools: Log in
Contents |
Retrieve theme modification value for the current theme.
If the modification name does not exist, then the $default will be passed through sprintf() with the first string the template directory URI and the second string the stylesheet directory URI.
<?php get_theme_mod( $name, $default ) ?>
This example could be used to add the custom background color as a border on the top of the footer. It would be css inserted in the header:
.footer {
border-top: solid 1px #<?php echo get_theme_mod( 'background_color' ); ?>;}
get_theme_mod() is located in wp-includes/theme.php.
set_theme_mod(), get_theme_mod(), get_theme_mods(), remove_theme_mod(), remove_theme_mods()