WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

rc-CSS

Your several stylesheets will be merged into a single compressed file, to optimize loading times for your users.

Upload rc_css/ directory to the /wp-content/plugins/ directory

Activate the plugin through the Plugins menu in WordPress

Place all your CSS in your theme directory (as usual) including style.css with WordPress comments.

Generaly:

wp-content/themes/YOURTHEME/style.css
wp-content/themes/YOURTHEME/reset.css
wp-content/themes/YOURTHEME/print.css
wp-content/themes/YOURTHEME/mobile.css
wp-content/themes/YOURTHEME/imgs/background.png

Create an empty file called rc_css_style.css in this directory (or copy the one included), and put 0666 permission (PHP need to rewrite this file).

In your header.php, replace (for example):

<link rel="stylesheet" href="<?php print get_bloginfo('template_directory'); ?>/reset.css" type="text/css" />
<link rel="stylesheet" href="<?php print get_bloginfo('template_directory'); ?>/print.css" type="text/css" media="print" />
<link rel="stylesheet" href="<?php print get_bloginfo('template_directory'); ?>/mobile.css" type="text/css" media="screen and (max-width: 400px)" />
<link rel="stylesheet" href="<?php print get_bloginfo('template_directory'); ?>/style.css" type="text/css" media="all" />

by:

<?php
    rc_CSS_enqueue_style( "/reset.css" );
    rc_CSS_enqueue_style( "/print.css" , "print");
    rc_CSS_enqueue_style( "/mobile.css" , "screen and (max-width: 400px)");
    rc_CSS_enqueue_style( "/style.css" );
    rc_CSS_echo_style( true );
?>

Order is important (for your CSS, as usual...). The function rc_css_echo_style() should be at the end.

Optionnaly, you can go to "Admin" > "Appareance" > "rc_CSS - Merge and optimize CSS" to specify comments that will be added at the top of css.

Codex

rc_css_enqueue_style( $css_filename , $css_media );
    $css_filename(string) : css filename, located in wp-content/themes/YOURTHEME/
    $css_media(string)(optional) : media query ( see http://www.w3.org/TR/css3-mediaqueries/ ) or all by default

rc_css_echo_style( $generate );
    $generate (boolean)(optional) : create file (1/True) or use existing file (0/False)
        - during development => true
        - for exploitation => false (or nothing)
        - if true, it's create a file
            wp-content/themes/YOURTHEME/rc_css_style.css

Requires: 3.4 or higher
Compatible up to: 3.4.2
Last Updated: 2012-6-27
Downloads: 604

Ratings

0 stars
0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.