Created
September 15, 2018 17:41
-
-
Save EastSideCode/1ee753edd367fb1f84db1726715b4ead to your computer and use it in GitHub Desktop.
Add a setting to WordPress customizer
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
// 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