1

Using the Theme Customizer, is it possible to hide / grey out options based on other options?

For example, I have a button. There are 3 settings related to the button:

  • Is it shown (checkbox)
  • Text inside button
  • Link location

If the button is not shown (i.e. unchecked), could the other 2 options be hidden / disabled in some way?

There is no point being able to customize something that is hidden

2

Yes. What you are looking for is the control's active state. This can be set in PHP via a control's active_callback.

For more details, see: http://ottopress.com/2015/whats-new-with-the-customizer/ https://wordpress.stackexchange.com/a/211953/8521

| improve this answer | |

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.