M
M
Mikhail Krivoruchko2018-08-12 10:42:23
WordPress
Mikhail Krivoruchko, 2018-08-12 10:42:23

How to remove unnecessary settings in the WordPress customizer?

When opening the customizer in WP, there are a lot of unnecessary menus on the left, such as "Header Images", "Additional Styles", "Colors".
I understand that sometimes these settings are needed, but for my theme they are completely unnecessary. Can I somehow remove them?
ps I'm
using the _s start pattern

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yanchevsky, 2018-08-12
@mishana

Try something like this:

function mytheme_customize_register( $wp_customize ) {
  $wp_customize->remove_section( 'title_tagline');
  $wp_customize->remove_section( 'colors');
  $wp_customize->remove_section( 'header_image');
  $wp_customize->remove_section( 'background_image');
  $wp_customize->remove_panel( 'nav_menus');
  $wp_customize->remove_section( 'static_front_page');
  $wp_customize->remove_section( 'custom_css');
}
add_action( 'customize_register', 'mytheme_customize_register', 99 );

https://codex.wordpress.org/Class_Reference/WP_Cus...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question