• Resolved girl_number_5

    (@trutherone)


    Hi
    Never crossed my mind until i just thought it through and realised i dont now how to create a child theme for each sub-domain based subsite in my network which mostly use WP-Astra sites. I’ve been doing it for ages on single WP installs! I’ve used the Astra site to create child themes before as they have a script to help you create the files and correct page header comment blocks.

    As well as the documented benefits of using child themes in WP, if possible id like to create some common functionality across all the subsites so if this were possible too it would be great. So for instance each subsite should have its own functions.php and style.css files and maybe if i could have a common location for subsite ‘global’ functions.php and style.css files to affect all subsites. Is this possible??

    Thanks in Advance …

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I just create a new child and name it something indicative of the site it is for and the child of the theme it is. Maybe a dash in the middle.

    You can have multiple theme children… you just can’t create a child with the same name as another and you can’t ‘chain’ child themes… You can’t have a child of a child in other words.

    Thread Starter girl_number_5

    (@trutherone)

    Ok cheers for that … what about a global functions php and style css file for some common functionality across all subsites (in my case currently 40)??

    I’m sure there’s a workaround but for now, I’d just ‘boilerplate’ a file containing those functions and copy/paste that into any child theme’s function.php file. That might be good also as you might not want all those functions in every child theme.

    You might read up on including external files into themes also. Themes are not my area of expertise but there’s some PHP that will pull in parts of other items into a theme.

    Thread Starter girl_number_5

    (@trutherone)

    Yes i thought of that but i’ve currently got 40 subsites and woefully by the end of the year 120 or so so i’m just trying to avoid that much duplication. Im pretty sure there must be a directory which could be seen as the subsite root such as /sites/ which holds all the subsite media files. Ill keep looking into it

    thanks for your replies.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do we create a child theme for each subsite in a multisite network’ is closed to new replies.