Last active
February 18, 2017 14:23
-
-
Save nielslange/21d4884eb6465e0d45006e92c2ab3b02 to your computer and use it in GitHub Desktop.
Enhance 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
<?php | |
//* Enhance customizer | |
add_action( 'customize_register', 'nl_enhance_customizer' ); | |
function nl_enhance_customizer( $wp_customize ) { | |
$wp_customize->add_section( | |
'footer_section', | |
array( | |
'title' => __('Title of the settings box', 'theme_name'), | |
'description' => __('Description of the settings box'), | |
'priority' => 150, | |
) | |
); | |
$wp_customize->add_setting( | |
'footer_textbox', | |
array( | |
'default' => __('Default value of the settings box', 'theme_name'), | |
) | |
); | |
$wp_customize->add_control( | |
'footer_textbox', | |
array( | |
'label' => __('Label of the control box', 'theme_name'), | |
'description' => __('Description of the control box'), | |
'section' => 'footer_section', | |
'type' => 'textarea', | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment