Skip to content

Instantly share code, notes, and snippets.

@moxdev
Created February 14, 2019 17:01
Show Gist options
  • Save moxdev/f4f9ed190901763404d722b380bfb45e to your computer and use it in GitHub Desktop.
Save moxdev/f4f9ed190901763404d722b380bfb45e to your computer and use it in GitHub Desktop.
Disable Uneccessary Deafult Panels In Underscores Theme #wp
// Disable uneccessary panels in theme customizer.
$wp_customize->get_section( 'header_image' )->active_callback = '__return_false';
$wp_customize->get_section( 'colors' )->active_callback = '__return_false';
$wp_customize->get_section( 'custom_css' )->active_callback = '__return_false';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment