WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Thirteen
Adding ie style sheet into child theme twenty thirteen (5 posts)

  1. terryrook
    Member
    Posted 7 months ago #

    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 :)

  2. Andrew
    Forum Moderator
    Posted 7 months ago #

    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' );

    ?
    http://codex.wordpress.org/Function_Reference/wp_dequeue_style

  3. terryrook
    Member
    Posted 7 months ago #

    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 );
  4. Andrew
    Forum Moderator
    Posted 7 months ago #

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

  5. terryrook
    Member
    Posted 7 months ago #

    Thanks will give it ago

Reply

You must log in to post.

About this Theme

About this Topic