• Resolved chrisboggs

    (@chrisboggs)


    Hello all,
    I have successfully created a childtheme using twentytwelve. I have created a copy of both the ie.css document and the directory in which it resides in my chiltheme directory using the same file path relationship as used in twentytwelve.

    Example: themes/mytheme/css/ie.css

    My problem is that my /css/ie.css in my childtheme is not being read. Do I need to add an additional @import rule? Include additonal logic in my childtheme header? How would I troubleshoot this?

    As always, any help on this matter would be greatly appreciated.

    -c-

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter chrisboggs

    (@chrisboggs)

    I have found a working solution and am posting a link here to help out if I can.

    Thanks! -c-

    I used the below code for my child’s functions.php and it works. For some reason I could not get the import url to work in ie.css in the site root or in css folder of child.

    My question. Using the below code. Do I need to run a full copy of ie.css in the child, or just my modifications?

    Sorry. I know it’s right in front of my face here. but if anyone can help me understand this code or point me to a noob friendly reference for php that would be great.

    `// remove ie css from twentytwelve theme
    function mytheme_dequeue_styles() {
    wp_dequeue_style( ‘twentytwelve-ie’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘mytheme_dequeue_styles’, 11 );
    //add new from child theme
    wp_enqueue_style( ‘mytheme-ie’, get_stylesheet_directory_uri() . ‘/css/ie.css’, array( ‘twentytwelve-style’ ), ‘1.0’ );
    $wp_styles->add_data( ‘mytheme-ie’, ‘conditional’, ‘lt IE 9’ );`

    https://artsamadhi.com/

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Sorry Turiyamoore, you ought to ask this within your own thread. Otherwise it’s difficult for forum volunteers to keep-track of who’s having which issue(s).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘need help with including ie.css in twentytwelve childtheme’ is closed to new replies.