get_theme_mod always returns default

In the Customizer code you need to do following change to work. You dont need ta_pluton_social_link[facebook] like array in Control. Check following example and modify accordingly to other fields also. $wp_customize->add_control(‘facebook’, array( ‘label’ => __(‘Facebook URL’, ‘ta_pluton’), ‘section’ => ‘ta_pluton_social_links’, ‘settings’ => ‘ta_pluton_social_link[facebook]’, )); To fetch URL you can use get_theme_mod. Check example below. Following … Read more

if has theme mod

try this code: if( get_theme_mod(‘your_setting_name’) ){ //your code }else{ //your code } Note: get_theme_mod() return false if no value exist for your setting

Why does get_theme_mod return blank (or default value) but get_option returns saved value?

This is original code from wordpress: function get_theme_mods() { $theme_slug = get_option(‘stylesheet’); $mods = get_option(“theme_mods_$theme_slug”); if (false === $mods) { $theme_name = get_option(‘current_theme’); if (false === $theme_name) $theme_name = wp_get_theme()->get(‘Name’); $mods = get_option(“mods_$theme_name”); // Deprecated location. if (is_admin() && false !== $mods) { update_option(“theme_mods_$theme_slug”, $mods); delete_option(“mods_$theme_name”); } } return $mods; } function get_theme_mods() { $theme_slug … Read more