How can I version the main CSS file?

Style.css is required for your WordPress theme. That’s where WordPress gets the theme name and meta information for the Appearance >> Themes menu from. That said, you don’t actually have to use style.css in your theme at all. I know of several readily available themes that don’t use it, and I only use it in a handful of my custom designs.

In header.php just place the following tag in place of the regular stylesheet link:

<link rel="stylesheet" type="text/css" href="https://wordpress.stackexchange.com/questions/136/<?php bloginfo("stylesheet_directory'); ?>/style-1.css" />

This will load your alternative stylesheet as the page’s stylesheet and completely ignore the regular style.css.

Leave a Comment