• Hi there,

    What I want to accomplish is the following:
    Use a single parent theme with several child themes, each child theme being a layout for my website so that I can showcase them to my client.

    However, whenever I switch from one child theme to the other, the settings from the customizer are applied to both child themes. So in other words, if I were to make a seperate home page for child theme 1 and I switch to child theme 2, I would have to reset the home page to the home page for child theme 2.

    This same thing counts for widgets and their locations.

    What can I do to keep the customizer settings seperate per child theme?

    Yours sincerely,
    Simbaclaws

Viewing 3 replies - 1 through 3 (of 3 total)
  • Not all of the options in the Customizer are theme options. Some are core options, like home page, site identity, menus, widgets, and some plugin options. The theme options are stored per theme, and that actually includes the menu locations and widget locations, but widgets and menus get “updated” on theme switch.
    You can save a draft Customizer changeset and get the preview link for it in the little panel that has the Save Draft button. That link can be sent to a client to view the site with those settings, but it is limited to one draft at a time by default. (You could write code to make it more.)
    You can also use a plugin that is a Theme Switcher, that has a button on the front end to switch between themes that you have set up in the back end, but still the home page is not a theme option.

    Thread Starter simbaclaws

    (@simbaclaws)

    Is there some form of hook I can use to change the settings for the home page to another page whenever the theme is switched? I would like to use a theme switcher in the frontend but can I also use a hook to set predefined widget and menu locations for these themes?

    If there is anything I can do development wise to make it so that switching a theme switches all of it’s settings to a predefined set, I would love to make it so. It would be the easiest way to showcase my themes to a client.

    I will bookmark this page for future reference.
    If nessecary I could make a plugin out of this just for showcasing purposes.

    • This reply was modified 5 years, 8 months ago by simbaclaws.
    • This reply was modified 5 years, 8 months ago by simbaclaws.

    You can see here the functions that are called. When reading the code, remember that some is in the context of the 1st theme, and some is in the context of the 2nd theme.
    Good luck on making the widgets do what you want.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customizer settings being applied to seperate child themes’ is closed to new replies.