• Resolved Tasha

    (@queenv)


    Hi all, I have a problem with my featured images on the homepage. In IE it shows a thin line either next to or underneath the image on roll over. As if the masking is not covering the image completely. All other browsers seems to be ok.

    Any ideas what this could be please?

    https://www.granthamfarm.angelicdesign.co.uk/

    Thank you in advance!

Viewing 15 replies - 31 through 45 (of 58 total)
  • Thread Starter Tasha

    (@queenv)

    is that all that should be in the functions.php. Should I delete all the rest from the original functions.php?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Did you already have a functions.php file in your Child Theme? I thought you just created it.

    Thread Starter Tasha

    (@queenv)

    I did just create one but the only way I know how is to copy the original into the child theme. I’m a bit green ??

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Delete all the code from your functions.php file in your Child Theme. Copying the parent theme’s function.php file over can break your site.

    So, after you’ve wiped your functions.php clean of code then add this:

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

    Thread Starter Tasha

    (@queenv)

    ok I’ve done that. I left the <?php at the top in?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yes, thanks for picking that up.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you replace that code I recommended above with this:

    function myCustomizrSetIEClass() {
     if ( is_front_page() ) {
      wp_enqueue_script( 'setIEClass', get_template_directory_uri() . '/inc/js/ie.js', '', '1.0', true );
     }
    }
    
    add_action( 'wp_enqueue_scripts', 'myCustomizrSetIEClass' );

    Thread Starter Tasha

    (@queenv)

    ok done

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you try this instead:

    function myCustomizrSetIEClass() {
      wp_enqueue_script( 'setIEClass', get_template_directory_uri() . '/inc/js/ie.js', '', '1.0', true );
    }
    
    add_action( 'wp_enqueue_scripts', 'myCustomizrSetIEClass' );

    Thread Starter Tasha

    (@queenv)

    ok done

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I can’t find your “ie.js” file at:
    https://www.granthamfarm.angelicdesign.co.uk/wp-content/themes/myCustomizr/inc/js/ie.js

    Can you make sure that your “ie.js” file resides at that address?

    Thread Starter Tasha

    (@queenv)

    oh, I was working locally. I’ll upload it to the live site

    Thread Starter Tasha

    (@queenv)

    it should be there now

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Ok, thanks ??

    I made another mistake.

    Can you try this code in your functions.php file instead:

    function myCustomizrSetIEClass() {
      wp_enqueue_script( 'setIEClass', get_stylesheet_directory_uri() . '/inc/js/ie.js', '', '1.0', true );
    }
    
    add_action( 'wp_enqueue_scripts', 'myCustomizrSetIEClass' );

    Thread Starter Tasha

    (@queenv)

    Sorry about the misunderstanding! I made the change and uploaded it to the live site.

Viewing 15 replies - 31 through 45 (of 58 total)
  • The topic ‘Problem with featured image in IE’ is closed to new replies.