Home Forums Mint Theme Discussion & Support Remove hover opacity change on Mint header images

This topic is: resolved

Tagged: , , ,

This topic contains 4 replies, has 2 voices, and was last updated by  Karen Hamilton 4 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3174

    Karen Hamilton
    Participant
    Post count: 4

    What is the style or script that causes the Mint theme’s header images to change opacity? I’ve been trying to find it so I can disable it in my child theme, but it is still eluding me.

    #3175

    themeweaver
    Keymaster
    Post count: 730

    This is done by javascript inside \js\tricks.js. You could remove the lines of code that start with the comment “//fancy thing for feature images…”

    #3177

    Karen Hamilton
    Participant
    Post count: 4

    Thanks! When I upgrade theme versions, will I have to repeat this action, or is there a way to disable it in my child theme?

    #3183

    themeweaver
    Keymaster
    Post count: 730

    That’s a bit trickier with javascript. there is a way of doing it with a child theme, but depends how much coding you know. Though it is just cutting and pasting..

    In your child theme functions you can redefine livingos_load_scripts() which is in extend\scripts.php.

    This function loads up all the js used by the theme.

    Copy the whole function into functions.php in the child theme and edit it to replace the two line at the bottom which call for the ‘tricks’ js file. Change the filename to a custom file of your own (i.e. tricks without the opacity code).

    e.g.

    // new tricks
    wp_register_script('tricks2', get_bloginfo('stylesheet_directory') . '/js/tricks.js',array('jquery'),1,true );
    			wp_enqueue_script('tricks2');
    
    //

    notice the change from template to stylesheet in the file url. This would look for ticks.js in a js folder inside your child theme.

    #3189

    Karen Hamilton
    Participant
    Post count: 4

    That worked perfectly. Thanks again!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.