Support » Themes and Templates » wp_enqueue_style() automattic _s responsive

  • Howdy howdy,

    I need your help. I’m developing an responsive, mobile first site using the awesome _s them from automattic. The only stumbling block I’m running into is how to best handle the stylesheets.

    The theme uses wp_enqueue_style() in functions.php as so:

    function joetheme_scripts() {
    global $post;

    wp_enqueue_style( ‘style’, get_stylesheet_uri() );

    wp_enqueue_script( ‘small-menu’, get_template_directory_uri() . ‘/js/small-menu.js’, array( ‘jquery’ ), ‘20120206’, true );

    if ( is_singular() && comments_open() && get_option( ‘thread_comments’ ) ) {
    wp_enqueue_script( ‘comment-reply’ );

    if ( is_singular() && wp_attachment_is_image( $post->ID ) ) {
    wp_enqueue_script( ‘keyboard-image-navigation’, get_template_directory_uri() . ‘/js/keyboard-image-navigation.js’, array( ‘jquery’ ), ‘20120202’ );
    add_action( ‘wp_enqueue_scripts’, ‘joetheme_scripts’ );

    Okay, simple enough right? Here is my goal in regular old html markup (via Brad Frost at

    <link rel=”stylesheet” type=”text/css” href=”style.css” media=”screen, handheld” />
    <link rel=”stylesheet” type=”text/css” href=”enhanced.css” media=”screen and (min-width: 40.5em)” />
    <!–[if (lt IE 9)&(!IEMobile)]>
    <link rel=”stylesheet” type=”text/css” href=”enhanced.css” />

    So here is your assignment, if you chose to help me out (I will so appreciate it!).

    What would my code look like if I correctly utilize wp_enqueue_style() in functions.php?

    THANK YOU!!!!!!!

  • The topic ‘wp_enqueue_style() automattic _s responsive’ is closed to new replies.