2

I am just trying to modify Twenty Seventeen theme by and I want to hide few customize options like Header Media and Colors how can I do it ?

enter image description here

I have researched it but it seems like the given options are unable to hide these menus.

Can someone give me a hook or something to be able to hide this please.

Thanks

2

You can change active status of section using customize_section_active filter. It gives 2 parameters $active-bool and $section-object. Haven't tried it so you can try and see if works for you.

Located in \wp-includes\class-wp-customize-section.php, for your research.

As second option you can try altering capability for the section.

Note: I'm just giving options, and have not done any of these before. So not sure about it.

| improve this answer | |
  • 2
    customize_section_active is a hook. Used to enable or disable a section. So in call back of it you can check your active theme and section id and disable which you want. – Aniruddha Gawade Aug 31 '17 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.