Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
So did it resolve the issue in IE10? If so there needs to be some JavaScript added so that you can only apply this sort of styling to IE10.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Do you have functions.php file in your Child Theme?
Thread Starter
Tasha
(@queenv)
Oh right! Yes it did fix the issue in IE10.
Thread Starter
Tasha
(@queenv)
No I don’t but I can add one?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Can you create a functions.php file in your Child Theme?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Do you have an “inc” folder in your Child Theme? If not can you create one and then create another folder within that called, “js”?
E.g:
/myCustomizr/inc/js
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
In your “js” folder can you create a file called “ie.js”?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
In your “ie.js” file add this:
jQuery(document).ready(function(){
setIEClass(10, jQuery);
}
function setIEClass($version, jQuery) {
$=jQuery;
if ($.browser.msie && $.browser.version == $version) {
$("html").addClass("ie10");
}
}
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Which page does the issue occur in, the home page?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Add this to your Child Theme’s functions.php file:
function myCustomizrSetIEClass() {
if ( is_home() ) {
wp_enqueue_script( 'setIEClass', get_template_directory_uri() . '/inc/js/ie.js', '', '1.0', true );
}
}
add_action( 'wp_enqueue_scripts', 'myCustomizrSetIEClass' );