Created
October 31, 2022 01:54
-
-
Save xcession/7ab2af2ec5f7448c51a3999023fc2ee4 to your computer and use it in GitHub Desktop.
[Custom side menu] WordPress customizer page side menu
This file contains hidden or 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
/* Custom side menu -------------------- */ | |
/* Custom side menu section */ | |
$wp_customize->add_section( | |
'side_menu_section', | |
array( | |
'title' => __('Side Menu'), | |
'description' => __('Customize page side menu.'), | |
'panel' => 'theme_settings', | |
) | |
); | |
/* Custom size menu setting */ | |
$wp_customize->add_setting( | |
'side_menu_name', | |
array( | |
'default' => __('None'), | |
) | |
); | |
/* Custom size menu control */ | |
$wp_customize->add_control( | |
'side_menu_name', | |
array( | |
'label' => __('Menu name'), | |
'section' => 'side_menu_section', | |
'priority' => 1, | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment