CSS AutoLoader

Description

This Plugin allows you to load additional CSS files without the need to change the theme

See also Plugin Homepage

To load additional stylesheets just put them into a directory named cssautoload (case-sensitive!). This directory can be placed in three different locations that are loaded in the following order:

  • Theme independent : in the wp-content directory
  • Theme dependent : in the Theme’s directory
  • Child Theme dependent (if using a Child Theme) : in the Child Theme’s directory

Only files with extension .css are added, all other files are ignored. Also files beginning with an underscore (_) are ignored.

CSS for different media

CSS allows to have different styles for different target devices. Files placed directly in the cssautoload directory are added with the media type ‘all’, suitable for all devices. To use a different media type just create a subdirectory with the name of the target media type (case-sensitive!). Te following CSS media types are supported according to the official CSS standard:

  • all for all devices – you don’t need to create the all directory, you also can put the files directly into the cssautoload root directory
  • braille for braille tactile feedback devices
  • embossed for paged braille printers
  • handheld for handheld devices
  • print for printouts or print preview on screen
  • projection for projected presentations
  • screen for screens
  • speech for speech synthesizers
  • tty for media using a fixed-pitch character grid
  • tv for television-type devices

Other subdirectories in cssautoload directory are ignored. Also subdirectories in the media subdirectories are not supported.

Translations

The CSS AutoLoader Plugin uses GlotPress – the wordpress.org Translation System – for translations. Translations can be submitted at translate.wordpress.org.

Translation are highly appreciated. It would be great if you’d support the CSS AutoLoader Plugin by adding a new translation or keeping an existing one up to date. If you’re new to GlotPress take a look at the Translator Handbook.

Do you like the CSS AutoLoader Plugin?

Thanks, I appreciate that. You don’t need to make a donation. No money, no beer, no coffee. Please, just tell the world that you like what I’m doing! And that’s all.

More plugins from Peter

  • JavaScript AutoLoader – Load JavaScript files without changing files in the theme directory or installing several plugins to add all the desired functionality
  • hashtagger – Use #hashtags and @usernames in your posts
  • 404page Define any of your WordPress pages as 404 error page
  • See all

Screenshots

  • Go to 'Tools' -> 'CSS AutoLoader' in your WordPress dashboard to see the possible paths where to store your CSS files and the currently loaded files

Installation

From your WordPress dashboard

  1. Visit ‘Plugins’ -> ‘Add New’
  2. Search for ‘CSS AutoLoader’
  3. Activate the plugin through the ‘Plugins’ menu in WordPress

Manually from wordpress.org

  1. Download CSS AutoLoader from wordpress.org and unzip the archive
  2. Upload the jcss-autoloader folder to your /wp-content/plugins/ directory
  3. Activate the plugin through the ‘Plugins’ menu in WordPress

Reviews

Easy, effective and clean, I love it!

Keep your HTML code clean with this plugin!!!
Most plugin/theme with css customisation I tested add css code directly in your html code, which is a bad code / seo practice. The other option so far was to modify the theme css. However, this practice would lead in issues when updating theme in new versions.
CSS Autoloader allows developers to add external css file(s) WITHOUT modifying the selected theme.

2 steps configuration :
1. Create a folder “cssautoload” in your theme folder.
2. Save your css file in the cssautoload folder
And that’s it!!!!

Result : it adds a tag in the head structure, such as : <link rel=’stylesheet’ id=’cssautoloader-a0681b9a98d7141bfe2716ded5c96bd9-css’ href=’http://www.[mysite]/wp-content/themes/sage/cssautoload/[mystylesheet.css]?ver=1487868463′ type=’text/css’ media=’all’ />

Bottomline, this plugin is efficient and simple, I love it!!!!

New feature suggestions :
have a folder structure to load specific css files per post types and categories

simple and effective

Although my theme features an “extra CSS” functionality, I prefer the AutoLoader because it loads a common CSS file instead of pasting the custom CSS into every page. Not to speak that I am able to distinguish between general-purpose and theme-dependent styles. Good job.

Read all 3 reviews

Contributors & Developers

“CSS AutoLoader” is open source software. The following people have contributed to this plugin.

Contributors

“CSS AutoLoader” has been translated into German. Thank you to the translators for their contributions.

Translate “CSS AutoLoader” into your language.

Interested in development?

Browse the code or subscribe to the development log by RSS.

Changelog

1.2 (2016-10-09)

  • switched translations to GlotPress
  • code redesign
  • no functional changes

1.1 (2015-12-15)

  • Added Language Pack Support for translations

1.0 (2015-09-28)

  • Initial Release