6

I have a mulisite setup and I am using one theme for multiple sites in it and each site have a custom layout and design. So for that I need to create a child-theme. But I don't know how to create multiple child theme for each site so I can add customization in each child theme style.css, footer.php, function.php, header.php

e.g

I am using theme canvas for all sites. then I created canvas-child and customized it for site1 now I need to customize it for other site2 then how I can create one more child theme with current main theme canvas to effect customization on site2.

3
  • You want to create a child of a child of a child theme?
    – s_ha_dum
    Commented Jan 16, 2013 at 21:49
  • Or are you asking how to make a theme with many children?
    – Tom J Nowell
    Commented Jan 16, 2013 at 22:04
  • I am asking for theme with many children Commented May 14, 2014 at 18:47

1 Answer 1

7

You can copy your canvas-child folder and call it canvas-child-2, or similar. Then open up style.css in canvas-child-2, and edit the Theme Name:. Do this for as many different child themes you need.

You will then need to enable the child themes for the sites you wish to use them on. Visit the Sites menu in your Network Dashboard, and click the edit link under one of the sites. Switch to the Themes tab and click on the Enable link under the name of the theme you wish to use on this site. Do this for all sites you wish to use a custom child theme on.

The final step is to activate the themes on the sites. Login to the site's administration dashboard and visit the Themes menu. Click on the Activate link under the child theme you wish to use on this site. Do this for all sites you wish to use a custom child theme on.

3
  • @bunjeshea Many Thanks for your answer and its exactly what i am looking for. I cannot give you repu or accept answer because of account restrictions. Commented May 14, 2014 at 18:47
  • 1
    The naming convention kind of sucks. If you wanted to map each child theme to a specific site. My advice would be to name the child theme directory like canvas-child-<site-id-here>. Then in your style.css set the Theme Name: Specific Site Name Here. From a file directory standpoint, the child themes are easy to locate and map. From a WordPress GUI standpoint, the child themes are quick and easy to identify for enabling/disabling, etc. Hope this helps someone. Commented Aug 16, 2017 at 19:39
  • @MichaelEcklund I agree that {theme}-child-{number} isn't a very good naming convention. It's only an example though, I would definitely encourage coming up with a much better one which fits the circumstances!
    – shea
    Commented Aug 19, 2017 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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