Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Matt

    (@sksmatt)

    Hi hagiasofiya,

    You can do it by hooking into the mv_gallery_to_slideshow_attr filter, like this:

    function my_gallery_to_slideshow_settings( $params ){
    
        /*
            'thumbnails'        => true,
            'slideshow'         => true,
            'slideshowSpeed'    => 7000,
            'animationDuration' => 600,
            'mousewheel'        => false,
            'controlNav'        => false,
            'keyboardNav'       => false,
            'directionNav'      => false,
            'manualControls'    => '.pager li a img',
            'pausePlay'         => false,
            'prevText'          => __( "Previous", 'mv-gallery-to-slideshow' ),
            'nextText'          => __( "Next", 'mv-gallery-to-slideshow' ),
            'pauseText'         => __( "Pause", 'mv-gallery-to-slideshow' ),
            'randomize'         => false,
            'slideToStart'      => 0,
            'animationLoop'     => true,
            'pauseOnAction'     => true,
            'pauseOnHover'      => false,
            'controlsContainer' => '',
        */
    
        $params['slideshow'] = false;
        return $params;
    }
    add_filter( 'mv_gallery_to_slideshow_attr', 'my_gallery_to_slideshow_settings' );

    Kind Regards!

    I am not sure what am I doing wrong but after adding the code to the functions.php in my child theme, the slideshow still runs… Any ideas?

    Ok I found the issue! Your sample code is calling “mv_gallery_to_slideshow_attr” instead of “mv_gallery_to_slideshow_js_params”!

    The first hook’s parameters are:

    Array
    (
        [id] => 22
        [order] => ASC
        [orderby] => menu_order ID
        [size] => full
        [link] =>
        [captions] => 1
        [exclude] =>
        [include] =>
        [numberposts] => -1
        [offset] =>
    )

    Hello Anton, sksmatt,

    I would like to use the code so the slideshow won’t be automatic. Anton, you found a solution but I can’t get it to work. What should I put in functions.php exactly?

    Thanks in advance!

    Ariane

    Hi arianne, I used “mv_gallery_to_slideshow_js_params” where the code was “mv_gallery_to_slideshow_attr” and it’s ok.

    Plugin Author Matt

    (@sksmatt)

    Hi Guys,

    Arian1001 is right, my mistake. The code above should be hooked to mv_gallery_to_slideshow_js_params:

    function my_gallery_to_slideshow_settings( $params ){
        /*
            'thumbnails'        => true,
            'slideshow'         => true,
            'slideshowSpeed'    => 7000,
            'animationDuration' => 600,
            'mousewheel'        => false,
            'controlNav'        => false,
            'keyboardNav'       => false,
            'directionNav'      => false,
            'manualControls'    => '.pager li a img',
            'pausePlay'         => false,
            'prevText'          => __( "Previous", 'mv-gallery-to-slideshow' ),
            'nextText'          => __( "Next", 'mv-gallery-to-slideshow' ),
            'pauseText'         => __( "Pause", 'mv-gallery-to-slideshow' ),
            'randomize'         => false,
            'slideToStart'      => 0,
            'animationLoop'     => true,
            'pauseOnAction'     => true,
            'pauseOnHover'      => false,
            'controlsContainer' => '',
        */
        $params['slideshow'] = false;
        return $params;
    }
    add_filter( 'mv_gallery_to_slideshow_js_params', 'my_gallery_to_slideshow_settings' );

    Is there a way to stop auto play selectively, perhaps through a shortcode attribute? I’ve been probing around in the code for awhile with no success.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Gallery to Slideshow] Stop Autoplay’ is closed to new replies.