WordPress.org

Support

Support » Themes and Templates » [Resolved] Theme: Twenty Twelve. Will IE8 Menu fix be applied?

[Resolved] Theme: Twenty Twelve. Will IE8 Menu fix be applied?

Viewing 6 replies - 1 through 6 (of 6 total)
  • esmi

    @esmi

    Forum Moderator

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

    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.

    Thank

    esmi

    @esmi

    Forum Moderator

    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.

    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.

    esmi

    @esmi

    Forum Moderator

    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.

    Thanks – that seems to have worked.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Theme: Twenty Twelve. Will IE8 Menu fix be applied?’ is closed to new replies.
Skip to toolbar