Home Forums Total Slider duration

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3103
    MatiasP
    Participant

    Hi, I’d appreciate if someone could tell me how I can delay the image swapping in the slider. I don’t mind modifying files. Thank you.

    #3109
    Hash
    Keymaster

    You need to modify the total-custom.js file in the line number 26 in the below reference link.
    Just increase the value of 5000 https://themes.trac.wordpress.org/browser/total/1.1.6.5/js/total-custom.js

    #3111
    MatiasP
    Participant

    It works! Thank you!

    #3118
    jrotella
    Participant

    Is there a way of doing this in the Additional CSS rather than modifying files?

    #3119
    MatiasP
    Participant

    I doubt it.

    #3185
    Hash
    Keymaster

    @jrotella it is not possible with custom CSS

    #3853
    carlo.cocco
    Participant

    Hi, the same thing can be done with a custom js file added in a chid theme?
    Thank you.

    #3854
    carlo.cocco
    Participant

    Hi, I solved.

    I create a new js file under total-child/js/ called total-child.js, containing the following js code to increase slider duration to 10 seconds:

    
    jQuery(function($){
    
      if($('#ht-bx-slider .ht-slide').length > 0){
         var owl = $('#ht-bx-slider');
         owl.owlCarousel({
            autoplay : true,
            items : 1,
            loop : true,
            nav: true,
            dots : false,
            autoplayTimeout: 10000,
            //autoplayHoverPause:true,
            animateOut: 'fadeOut'
         });
         owl.trigger('play.owl.autoplay',[1000]); 
      }
    });
    

    Then, in my child theme functions.php file, I added the following instruction:

    
    function total_child_scripts() {
     
        wp_enqueue_script( 'total-child-custom', get_stylesheet_directory_uri() . '/js/total-child-custom.js', array('jquery'), null, true );
    
    }
    add_action( 'wp_enqueue_scripts', 'total_child_scripts', 10 );
    

    Maybe can be helpful.

    Regards!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.