Thematic - functions.php problem solved

Thanks to a helpful email from Ian Stewart, I now have solved the problem whereby I wanted my child theme, murkymatic, to check for the existence of a variant.css file. The issue was that I was not using the path to the directory, but was instead using the path for the web. I.e. the program needed a path that looked like /home/public_html/wp-content/themes/.... etc, and I gave it http://www.murky.org/wp-content/... etc...

function childtheme_variantcss() {     // Pre-2.6 compatibility     if ( !defined('WP_CONTENT_URL') )         define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');     if ( !defined('WP_CONTENT_DIR') )         define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );

    // Guess the location     $variantcss_path = WP_CONTENT_DIR.'/themes/murkymatic/variant.css';     $variantcss_url = WP_CONTENT_URL.'/themes/murkymatic/variant.css';

    if (file_exists($variantcss_path)) { ?>         <!-- Custom CSS --> <link rel="stylesheet" type="text/css" href="<?php bloginfo('wpurl'); ?>/wp-content/themes/murkymatic/variant.css" />     <?php } elseif (file_exists($variantcss_url)) { ?> <!-- Custom CSS -->         <link rel="stylesheet" type="text/css" href="<?php bloginfo('wpurl'); ?>/wp-content/themes/murkymatic/variant.css" />     <?php } else { ?> <!-- Create the file variant.css in the murkymatic directory to customise things --> <?php } }

add_action('wp_head', 'childtheme_variantcss');

This is placed in the functions.php file.