Skip to content

Instantly share code, notes, and snippets.

@generatepress
Last active October 6, 2022 03:09
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save generatepress/f04d0881f806e84be0ac to your computer and use it in GitHub Desktop.
Save generatepress/f04d0881f806e84be0ac to your computer and use it in GitHub Desktop.
Remove sections from GeneratePress Customize area
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