ThemeShaper Forums » Thematic

[closed]

Loading separate CSS sheet per site

(3 posts)
  • Started 3 years ago by jcollier
  • Latest reply from jcollier
  • This topic is not resolved
  1. I am using a single Thematic child theme for several sites in 3.01 multisite.

    How to I load a separate CSS sheet for each site in the single child theme?

    (I assume this is possible, because I've been able to do everything else I wanted with Thematic ;)

    Posted 3 years ago #
  2. :)

    Ok .. try this one:

    function my_stylesheet() {
    
    	global $current_blog;
    
    	$blog_id = $current_blog->blog_id;
    
    	$content = "\t";
            $content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
    
    	if ($blog_id == '1') {
    		$content .= get_bloginfo('stylesheet_directory') . '/blog1.css';
    	} elseif ($blog_id == '2') {
    		$content .= get_bloginfo('stylesheet_directory') . '/blog2.css';
    	} else {
    		$content .= get_bloginfo('stylesheet_url');
    	}
    
        $content .= "\" />";
        $content .= "\n\n";
    
        return $content;
    }
    
    add_filter('thematic_create_stylesheet', 'my_stylesheet');

    Chris

    Posted 3 years ago #
  3. Thank you!

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.