The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [get-theme-mod]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
2answers
5k views

Use default value of wp_customizer in theme_mod output?

Is there a way to output the default value of a wp_customize text field type using the echo get_theme_mod (); without actually going in the Theme Customizer, modifying something and then saving it? ...
17
votes
5answers
17k views

get_option() vs get_theme_mod(): Why is one slower?

I've been using get_theme_mod() for some time in various projects of mine. I decided to take advantage of the Theme Customization API in WordPress v3.4 once it was available as I felt it was an ...
3
votes
1answer
3k views

customize_register with Multiple controls/settings - how to get values?

PHP newbie here, and I have this on my functions.php function mcs_social($wp_customize){ $wp_customize->add_section('mcs_social_handle', array( 'title' => __('Social Network ...
2
votes
1answer
2k views

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

Why does get_theme_mod return blank (or the default value if specified) but get_option returns the correct (saved) value? I have a colour picker in the customizer color-primary which functions ...
2
votes
2answers
2k views

if has theme mod

Does someone know how to write the next line in wordpress PHP, because i'm not that great with PHP. If_theme_mode has content echo { my content } else { other content }; thnx
0
votes
1answer
79 views

Why is remove_setting and remove_control not working?

I've renamed my theme folder and all other title related bits, but I had a long list of settings and controls that were added with labels related to the old name, I want to remove these. I believe I'...