This topic contains 1 reply, has 2 voices, and was last updated by  Dominykas 3 years, 1 month ago.

  • Creator
    Topic
  • #1112

    John
    Participant

    Is there a way to control the timing of how fast the slideshow version of the widget changes?

  • Author
    Posts
  • #1113

    Dominykas
    Keymaster

    Hi John,

    I hope you are well and thanks for asking! :)

    Yes. You can change the timing by hooking into ‘elm_rt_slideshow_args’ filter. Simply, add the following code to your theme’s functions.php file:

    
    /**
     * Modifies Content Randomizer images slideshow arguments.
     *
     * @param string $slideshow_args Arguments for slideshow
     * @return string A new modified arguments.
     */
    function custom_elm_rt_slideshow_args( $slideshow_args ) {
    
    	$slideshow_args = 'singleItem:true, 
    		items:1, autoplay: true, 
    		autoplayTimeout: 3000, 
    		autoplayHoverPause: true, 
    		dots: false, 
    		loop: true';
    
    	return $slideshow_args;
    }
    add_filter( 'elm_rt_slideshow_args', 'custom_elm_rt_slideshow_args' );
    </code>

    In $slideshow_args string you can see autoplayTimeout: 3000. By changing this line number you can control the timing. The current auto play time is 3000ms or 3seconds.

    Please let me know if you have any more questions.

    Thanks!

The topic ‘[Solved] Timing’ is closed to new replies.