Twenty Fourteen includes its stylesheet through wp_enqueue_style, although you were correct in that wp_head() is required in order for the function to execute correctly.
Thanks, stephencottontail!
A quick search of the /twentyfourteen directory only turns up a few instances of “wp_enqueue_style”, all of which occur in the theme’s “functions.php” file and none of which are for the “style.css” file.
Am I looking in the wrong place?
Note: I used the extended Find tool that comes with Komodo Edit 8.5 to do a recursive search in the /twentyfourteen directory.
function twentyfourteen_scripts() {
// Add Lato font, used in the main stylesheet.
wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null );
// Add Genericons font, used in the main stylesheet.
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.2' );
// Load our main stylesheet.
wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri(), array( 'genericons' ) );
// Load the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style', 'genericons' ), '20131205' );
wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
if ( is_singular() && wp_attachment_is_image() ) {
wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' );
}
if ( is_active_sidebar( 'sidebar-3' ) ) {
wp_enqueue_script( 'jquery-masonry' );
}
if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true );
wp_localize_script( 'twentyfourteen-slider', 'featuredSliderDefaults', array(
'prevText' => __( 'Previous', 'twentyfourteen' ),
'nextText' => __( 'Next', 'twentyfourteen' )
) );
}
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140319', true );
}
add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
Ah, I see it now… I didn’t realize that get_stylesheet_uri() existed. I’ll try using that. Thanks, all!