• Hi trying to work out how to call up a custom style sheet for ie in my child theme in twenty thirteen. Do I need to include the “add_action” code?

    <?php
    /* Loads the Internet Explorer specific stylesheet.
    ======================================= */
    	wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/ie.css', array( 'twentythirteen-style' ), '2013-07-18' );
    	wp_style_add_data( 'twentythirteen-ie', 'conditional', 'lt IE 9' );
    
    add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' );
    /* End of: Loads the Internet Explorer specific stylesheet.
    ======================================= */
    ?>

    It does not override the css in the parent so I think I need to remove it by using this function but I need help finishing it off:

    function mytheme_dequeue_styles()

    Any help much appreciated ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    This is Twenty Thirteen’s enqueing of the ie.css file:

    wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentythirteen-style' ), '2013-07-18' );

    And so have you tried dequeing that with something like:

    wp_dequeue_style( 'twentythirteen-ie' );

    ?
    https://codex.www.ads-software.com/Function_Reference/wp_dequeue_style

    Thread Starter terryrook

    (@terryrook)

    Thanks again Andrew. Do I need the add_action as well? I copied this from a twenty twelve child theme. I dont know what the number at the end of the add_action refers to?

    function mytheme_dequeue_styles() {
       wp_dequeue_style( 'twentythirteen-ie' );
     }
     add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_styles', 11 );
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I don’t think you need to put it in a function, but I’ve never used it so I could be wrong.

    Thread Starter terryrook

    (@terryrook)

    Thanks will give it ago

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding ie style sheet into child theme twenty thirteen’ is closed to new replies.