• Maybe this is a standard WordPress question, but I thought it might also be related to Customizr.

    For each site in multisite, I am using a child theme. Each child theme has it’s own css, which is great.

    But I also have css which applies to all child themes. If I change this css in a child theme of one site in multisite, then I have to update it in all child theme stylesheets for the other sites in multisite.

    Is there are recommended method of creating a master theme that includes css for all sites?

    In other words, if I make a css change (or other theme change -header, etc) that I want to apply to all sites in a network, is there a way to create a master theme I can use for editing?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I usually do what you do, but you could set up a file eg masterstyle.css and add @import url("../customizr-child/masterstyle.css") ;
    at the front of each css file.

    Thread Starter andrew55

    (@andrew55)

    rdellconsulting – thanks for the reply.

    I’ve seen where @import can be used, but I’ve heard to many bad things about it – performance, css not loading correctly, search engines don’t like it, etc.

    Fortunately, I “think” I found a solution here:
    http://codex.wordpress.org/Child_Themes

    … in the section: Using wp_enqueue_style instead of @import

    Instead of style.css for the parent theme, I pointed it to style2.css and just make all my changes there. Then I following instructions for child theme. When I want to make a change to all sites, I just edit style2.css and shoot it up to server.

    I’m no expert, but it seems to work so far, and from what I can tell, seems to be more legit way of doing it.

    Now if I can just figure out how to include theme files in a master theme (header.php, footer.php, etc). Not sure if this will be so easy.

    Yes, you’re now the master 😉

    wp_enqueue_style is definitely the right way to go, wished I’d thought of that!

    I see what you’re getting at. Remember that CTs are simply the deltas from the core Theme, so Customizr IS the master theme.

    If you want to change things in header.php, footer.php etc then Hooks API is the best way to go.

    Read this and this

    Thread Starter andrew55

    (@andrew55)

    Yes, I’m such a master I can’t even understand what you last sentence means 🙂

    Haha, I’ve even lost my ability to coach, so humble in your shadow 😉

    The Child Theme contains the differences from the core Theme, so if each of your multisites needs a different footer (for example), then you’d set up changes in each Child Theme style.css/functions.php.

    Thread Starter andrew55

    (@andrew55)

    I have this in the funtions.php of the parent theme:

    add_action( 'wp_enqueue_scripts', 'load_my_styles' );
    function load_my_styles() {
        wp_enqueue_style( 'parent-theme', get_template_directory_uri() . '/style2.css' );
    }

    If works great at allowing me to use style2.css for the css of all sites. Currently, style2.css is in the main Customizr directory.

    Quick question: I work on the main css quite often. If I move style2.css to the main root of our site, is there a simple method of adjusting this path…

    wp_enqueue_style( 'parent-theme', get_template_directory_uri() . '/style2.css' );

    …to the new location of style2.css (in root of site)?

    I’ve experimented with adjusting the path in different ways, with no success. Thanks for any suggestions.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘master child theme for multisite in customizr’ is closed to new replies.