Created
March 17, 2016 09:50
-
-
Save BeFiveINFO/23407e981e3120c22457 to your computer and use it in GitHub Desktop.
Using get_theme_mod() so that it works in Customizer live preview
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
<?php | |
// for example, in your functions.php or anywhere in your theme | |
// Use wp_loaded action hook | |
add_action( 'wp_loaded', 'get_my_options' ); | |
function get_my_options() { | |
define('MY_OPTION',get_theme_mod('my_option', FALSE)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment