Created
February 25, 2014 14:14
-
-
Save tomhemsley/9209552 to your computer and use it in GitHub Desktop.
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. | |
* | |
* Use this filter to stop Flex Slider from looping back to the start of the slideshow (ending on the first slide, after a complete rotation) | |
*/ | |
function metaslider_loop_once_stop_on_first($options, $slider_id, $settings) { | |
$options['after'][] = "if (slider.currentSlide == 0) { slider.pause(); }" ; | |
return $options; | |
} | |
add_filter('metaslider_flex_slider_parameters', 'metaslider_loop_once_stop_on_first', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment