Loading stylesheets in WordPress themes
function theme_styles()
{
// Register the style like this for a theme:
// (First the unique name for the
// style (custom-style) then the src,
// then dependencies and ver no. and media type)
wp_register_style( 'custom-style',
get_template_directory_uri() . '/css/custom-style.css',
array(),
'20120208',
'all' );
// enqueing:
wp_enqueue_style( 'custom-style' );
}
add_action('wp_print_styles', 'theme_styles');
|