[resolved] Theme: Twenty Twelve. Will IE8 Menu fix be applied? (7 posts)

  1. Lanod
    Posted 3 years ago #


    In this thread someone posts about a fix for the Twenty Twelve IE 8 Menu issue:

    The fix is http://core.trac.wordpress.org/changeset/22201

    My question is, should I apply this fix myself, or wait for to be applied to the Twenty Twelve theme? (Also, will it be applied?)

    The fix involves making changes to the Functions.php file. I use a child theme and am not sure I should be making changes to the parent theme functions file - won't it be overwritten if the theme gets updated?


  2. esmi
    Forum Moderator
    Posted 3 years ago #

    In your shoes, I'd make the change via the child theme and then wait for the core theme to be updated.

  3. Lanod
    Posted 3 years ago #

    Hi Esmi,

    I thought there could only be one functions.php file?

    See http://wordpress.org/support/topic/functionsphp-will-not-work-with-child-theme

    I tried making the change to it and adding it to the child theme folder but got the errors described in the link when I uploaded it.


  4. esmi
    Forum Moderator
    Posted 3 years ago #

    No - a child theme can - and often does - have its own functions.php file. But what you can't do is simply copy the parent's functions.php file into the child. You start with a blank file in the child and then just add your new or customised functions.

  5. Lanod
    Posted 3 years ago #

    I thought that was the case it's just this fix involves changes to the existing functions.php file, not adding my own functions.

    Is there an easy way for me to take the supplied functions file and update it for the theme?

    I tried taking the functions.php file from the link and doing a search and replace for 'twentytwelve' to 'DEV Twenty Twelve Child' but that failed.

    Thanks again - really appreciate the prompt replies.

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    Try just adding:

    function twentytwelve_child_scripts_styles() {
    	global $wp_styles;
    	 wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' );
    	$wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
    add_action( 'wp_enqueue_scripts', 'twentytwelve_child_scripts_styles' );

    to the child's functions.php file.

  7. Lanod
    Posted 3 years ago #

    Thanks - that seems to have worked.

Topic Closed

This topic has been closed to new replies.

About this Topic