• Resolved nfinance2

    (@nfinance2)


    I have set up multisite WP with my https://www.maindomain.com, I made the rookie mistake of not creating a child theme and I need to do updates so I am about to pay the consequences and now activate my child theme which was included with my parent theme download. After I activate my child theme and fix whatever did not carry over from the parent update, that will be my maindomain.com master theme for my main website.

    So my reason for multisite is that I will be creating subdomains for specific client stores that are password protected. Each subdomain will be a basic version of the maindomain.com that really only includes a home and shop page with their own customization. What I want to know is after I create store1.maindomain.com, store2.maindomain.com, store3.maindomain.com etc, I want to then take that child theme created for maindomain.com into store1.maindomain.com and delete all the content I do not need for all these subdomains, and this new child theme will be ready to be used as the “store child theme” to customize for each store subdomain.

    If what I am explaining is the correct approach,

    What steps do I take to use that first child theme I customize from maindomain.com and copy it to store1.maindomain.com? I am completely new so I need step by step please from how to copy/save and upload etc.

    After I get that first child theme into store1.maindomain.com and I edit again to customize how my individual store subdomains will start to look, how do I copy this new version of child theme into all the other stores?

    Can this even be done like I am suggesting? I just need to make sure that any customization to each individual child theme doesn’t have any effect on the other child themes if that makes sense.

    So for example maindomain.com is the general merchandise store with more content and pages. Store1.maindomain.com includes a home and shop page for Store 1 customers only with different product, perhaps different menu items, colors, and main page slider. Same type of changes for Store2.maindomain.com, and so on.

    I am just not sure on the proper way to set this up and any help would be appreciated even if someone can direct me to a video or other source. I have spent days reading about this and I am not finding specific instructions on using child themes on multiple subdomains with regard to saving/duplicating/changing/editing etc. Thank you

Viewing 11 replies - 1 through 11 (of 11 total)
  • O.k., it sounds like you have a few questions all rolled into one here so let’s see what we can do.

    In a multisite setup each site has it’s own content so as long as you didn’t hard code content into the themes templates then you do need to worry about that.

    In a multisite setup your themes are available to every site in the network after you go to Network Admin->Themes and click Network Enable. Now you should be able to to any of your sub-sites and activate the child theme if desired.

    If you plan to make code customizations such as to the style.css or customize page templates you could simply copy the existing child theme and then go into the style.css and change the Theme Name to a unique name.

    I hope this helps get you started.
    Bill

    Thread Starter nfinance2

    (@nfinance2)

    Thanks Bill,

    I didn’t have as many issues as I thought when I activated that child theme in the mainsite.com so most of the changes carried over from what I did in the parent theme.

    How do I now take the child theme from mainsite.com with all my custom content and activate it on my new subdomain so it shows all of that content? I just activated the child theme from Appearance – Themes to my new subdomain but it is the unchanged child theme that came with my theme.

    I am not sure how to copy an edited child theme and use it in another subdomain.

    If the theme has been network enabled you should be able to find it in any of your sub sites under appearance-> themes and activate it for that sub site.

    As for the content if it was created in the backend using the wp page/post editor it will not appear on the sub site. You can import it into the sub site by going to Tools->export and export the content. Now go to the sub site Tools->import and choose the WordPress importer and import your export file.

    Thread Starter nfinance2

    (@nfinance2)

    Is that what I want to do if I want an exact copy of the mainsite including media gallery, custom text fields, products etc? I want my subdomains to have the exact same site I have already worked on and the only changes I will make after copying it on each individual subdomain is the header/logo and products. I just want to make sure that export/import copies everything over. Wondering if I should be looking at clone/duplicate plugins or if this can be done easily without?

    Sorry for the delay. A plugin might be a good option, I have not personally used this one but it does seem to be highly rated by other users so it may be worth checking out:

    NS Cloner

    Good Luck
    Bill

    Thread Starter nfinance2

    (@nfinance2)

    Thank you! I tried the NS Cloner and it worked great, only thing is now to figure out what I do since the cloner didn’t make a new child theme folder. Both the mainsite to which I cloned to this new site are sharing the same child theme So I assume that any changes will apply to both. I guess I will have to submit a question to the NS Cloner team.

    Yes, that is how themes work in a multisite setup. For each parent and/or child theme there is only one copy which is shared across the network.

    If you need a completely separate child theme make a copy of the existing child theme, in the new copy go into the style.css and change the name to something unique. Upload it to your network, network enable enable it as described in my previous post.

    Now, when you go to any of your subsiites you should be able to enable the new child theme that site. You can activate the same theme for as many sites as you like. You can repeat the steps above and create as many child themes as you need.

    Cheers
    Bill

    Thread Starter nfinance2

    (@nfinance2)

    That is what I do not understand about using the same child theme in multisite because if you are sharing the same child theme folder and you make changes on one site such as menu structure, colors etc, won’t those changes apply to all the subdomains using that child theme? That is why I thought I needed to create a child theme folder for each subdomain and rename childtheme1, childtheme2, etc. specifically if I add custom css to one of the subdomains using the same child theme, I have to go into style.css so this is where I get confused.

    Sorry to be a pain, I am just trying to wrap my brain around the concept and I really appreciate your time.

    No worries, the concept of the child theme can be confusing at first.

    Basically your on the right track, if you make a code edit in a child theme that edit will affect all subsiites using that child theme. If you wish to make code edits that aply to one or some but not all subsiites you do need to create another child theme.

    You are using the same parent theme so making additional child themes is as simple as making a copy of the original child theme, now in the newly created copy edit the name in the style.css. Don’t forget to change the themes folder name. You now have a new child theme ready for editing.

    You can do this locally and from the new child theme to your WP themes directory. You could also save it as a zip and upload it through WordPress theme uploader.

    Thread Starter nfinance2

    (@nfinance2)

    ok got it, thank you makes perfect sense. I appreciate all your help!

    No problem,

    Good luck
    Bill

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Child Theme and subdomains’ is closed to new replies.