Last active
August 29, 2015 14:07
-
-
Save tomhemsley/87270edaf6247352dfef to your computer and use it in GitHub Desktop.
Meta Slider - Pause on slide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* INSTALLATION: this code should be pasted into your theme's functions.php file. | |
*/ | |
function metaslider_pause_on_slide($options, $slider_id, $settings) { | |
$slide_to_pause = 3; // <- change this number | |
// do not edit below this line | |
$options['after'][] = "if (slider.currentSlide == ({$slide_to_pause} - 1)) { slider.pause(); }"; | |
return $options; | |
} | |
add_filter('metaslider_flex_slider_parameters', 'metaslider_pause_on_slide', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment