Viewing 4 replies - 1 through 4 (of 4 total)
  • Well, you can add your hook in a plugin.
    Themes should not be changing the Customizer anyway.

    Thread Starter lveale

    (@lveale)

    Ah that makes sense, I have it working now.
    When you say I shouldn’t be changing the customizer in the theme anyway does that mean that I should also be adding sections to the customizer through the plugin? I don’t get a warning for that like I did for removing panels in the theme?

    Thanks

    I think that depends on what you are doing. Themes can provide options in the Customizer, but the theme code should only affect the theme’s options. So the theme should not be doing anything with core or plugin panels and options.
    So if the new panels you are adding are for theme options, you can add them in a theme. But if they are for something else, then they belong in a plugin.
    In other words, themes should not have side effects of using them, like changing media sizes or menus or whatever is stored in the database that is not the theme options. A user should be able to switch themes at any time, even between pages via a plugin. The theme’s responsibility is just the display of the front end.

    Thread Starter lveale

    (@lveale)

    OK that makes a lot of sense, thanks so much for your help and taking the time to explain, it’s much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘customize_loaded_components’ is closed to new replies.