Theme customizer: How do you grab the value later?

I made one change…

 $wp_customize->add_setting(
        // ID
        'primm_slider_speed',
        // Arguments array
        array(
            'default' => '5000',
            'type' => 'theme_mod'    <-- made change right here.
        )
     );

'type' = 'option' just didn’t work. 'type' = 'theme_mod' totally nailed it.

Option set manually to 6200, hit save. Refresh home page. Output now:

 Slider Timing: 6200string(4) "6200" 

Big Ouch… the choices for type="option" or 'theme_mod' followed by my later call to get_theme_mod()… Which one do you think will work? (hint: duh)

Info provided here for anybody who may experience the same issue.

Leave a Comment