Created
October 17, 2012 00:01
-
-
Save clarklab/3902885 to your computer and use it in GitHub Desktop.
get_theme_mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- in footer.php --> | |
<div class="footer-text"><?php echo get_theme_mod('footer_text') ?></div> | |
<!-- rendered HTML content --> | |
<div class="footer-text">©2012 Site Name</div> | |
<!--in functions.php (to enable the field in the Theme Customizer) --> | |
<?php | |
$wp_customize->add_section( 'footer', array( | |
'title' => 'Footer', | |
'priority' => 105, | |
) ); | |
$wp_customize->add_setting( 'footer_text', array( | |
'default' => '', | |
) ); | |
$wp_customize->add_control( 'footer_text', array( | |
'label' => 'Footer Tagline', | |
'section' => 'footer', | |
'type' => 'text', | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome - thanks for this Clark