Last active
October 6, 2022 03:09
-
-
Save generatepress/f04d0881f806e84be0ac to your computer and use it in GitHub Desktop.
Remove sections from GeneratePress Customize area
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
add_action( 'customize_register', function( $wp_customize ) { | |
// Remove default sections | |
$wp_customize->remove_section('generate_colors_section'); | |
$wp_customize->remove_section('generate_typography_section'); | |
$wp_customize->remove_panel('generate_layout_panel'); | |
// Remove Menu Plus section. | |
$wp_customize->remove_panel('generate_menu_plus'); | |
// Remove Generate Backgrounds section | |
$wp_customize->remove_panel('generate_backgrounds_panel'); | |
// Remove Generate Blog sections | |
$wp_customize->remove_section('generate_blog_section'); | |
}, 2000 ); | |
add_action('after_setup_theme', function() { | |
remove_action('customize_controls_print_footer_scripts','generate_customize_preview_js'); | |
remove_action('admin_menu', 'generate_create_menu'); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment