I am creating a custom theme with a theme options page.
I would like to style the options page and do not want to include inline styles. Is there any way to include an external stylesheet from say
TEMPLATEPATH . '/css/admin.css'
I have also found this chunk of code and it seems to work – link
function admin_register_head() {
$siteurl = get_option('siteurl');
$url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/yourstyle.css';
echo "<link rel="stylesheet" type="text/css" href="https://wordpress.stackexchange.com/questions/2073/$url" />\n";
}
add_action('admin_head', 'admin_register_head');
What is the best way?