Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #271385

    I have the fullscreen slider on my home page. Any time I use the arrows to move to the next slide or use a swipe gesture on a mobile device the auto rotation of the slideshow stops. How do I disable this?

    #271664

    Hey kevinjsutton!

    Open up wp-content/themes/enfold/js/shortcodes.js and replace:

    
    		// public method: shows next image
    		next : function(e)
    		{
    			e.preventDefault();
    			this._stopSlideshow();
    			this._navigate( 'next' );
    		},
    
    		// public method: shows previous image
    		previous : function(e)
    		{
    			e.preventDefault();
    			this._stopSlideshow();
    			this._navigate( 'prev' );
    		},
    

    with

    
    		// public method: shows next image
    		next : function(e)
    		{
    			e.preventDefault();
    			this._stopSlideshow();
    			this._navigate( 'next' );
    			this.options.autoplay = true;
    			this._startSlideshow();
    		},
    
    		// public method: shows previous image
    		previous : function(e)
    		{
    			e.preventDefault();
    			this._stopSlideshow();
    			this._navigate( 'prev' );
    			this.options.autoplay = true;
    			this._startSlideshow();
    		},
    

    Regards,
    Peter

    #271908
    This reply has been marked as private.
    #272266

    Hey!

    Yes, I forgot to set the “autoplay” variable to true. I corrected the code here: https://kriesi.at/support/topic/fullscreen-slider-pause-issue/#post-271664

    If you want to overwrite the default (parent theme) shortcode.js file with your child theme copy the shortcode.js file from the parent theme folder into the js folder of your child theme (i.e. the path looks like wp-content/themes/enfold-child/js/shortcodes.js) and add this code to the child theme functions.php file:

    
    if(!is_admin()) add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 1);
    function avia_register_child_frontend_scripts()
    {
    	$child_theme_url = get_stylesheet_directory_uri();
    	wp_dequeue_script('avia-shortcodes');
    	wp_enqueue_script( 'avia-shortcodes', $child_theme_url .'/js/shortcodes.js', array('jquery'), 1, true );
    }
    

    Cheers!
    Peter

    #272276
    This reply has been marked as private.
    #272278

    Hey!

    Yes exactly – you need to add the code ( https://kriesi.at/support/topic/fullscreen-slider-pause-issue/#post-272276 ) to your child theme functions.php – otherwise the child theme won’t load the modified shortcodes.js file.

    Cheers!
    Peter

    #272283

    Worked like a charm. Thanks very much for your help!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Fullscreen Slider Pause Issue’ is closed to new replies.