Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add a setting to WordPress customizer
// This example is for a section called theme options, with a setting for copyright text
$wp_customize->add_section( 'theme_options_section' , array(
'title' => __('Theme Options','themename'),
'priority' => 30,
) );
$wp_customize->add_setting( 'copyright_text' , array(
'default' => 'Default text here'
) );
$wp_customize->add_control(
'copyright_setting',
array(
'label' => __( 'Copyright Text', 'themename' ),
'section' => 'theme_options_section',
'settings' => 'copyright_text',
'type' => 'textarea'
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.