Advanced Ads Slideshow set to infinite scroll
authorLaury GvR <laury@gaslightmedia.com>
Thu, 1 Feb 2018 18:52:20 +0000 (13:52 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 1 Feb 2018 18:52:20 +0000 (13:52 -0500)
Slider was scrolling back from the right to the first ad after
reaching the last one. Added a setting in functions file to set
that behaviour to be infinite instead.

functions.php

index 24d6022..72c1c4b 100644 (file)
@@ -328,3 +328,10 @@ require get_template_directory() . '/inc/custom.php';
  * Royal Slider Custom Settings.
  */
 require get_template_directory() . '/inc/royalslider.php';
+
+
+function restore_slider_behavior( $settings ) {
+  $settings['infinite'] = 'true'; 
+  return $settings;
+}
+add_filter( 'advanced-ads-slider-settings', 'restore_slider_behavior' );
\ No newline at end of file